[csw-devel] SF.net SVN: gar:[4966] csw/mgar/pkg/php4/trunk/files/CSWphp4cgi.postinstall
valholla at users.sourceforge.net
valholla at users.sourceforge.net
Tue May 19 22:11:09 CEST 2009
Revision: 4966
http://gar.svn.sourceforge.net/gar/?rev=4966&view=rev
Author: valholla
Date: 2009-05-19 20:11:09 +0000 (Tue, 19 May 2009)
Log Message:
-----------
fix
Modified Paths:
--------------
csw/mgar/pkg/php4/trunk/files/CSWphp4cgi.postinstall
Modified: csw/mgar/pkg/php4/trunk/files/CSWphp4cgi.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4cgi.postinstall 2009-05-19 20:10:53 UTC (rev 4965)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4cgi.postinstall 2009-05-19 20:11:09 UTC (rev 4966)
@@ -1,21 +1,20 @@
#!/bin/sh
-PKGINST=CSWphp4cgi
+
PATH=/bin:/usr/bin:/opt/csw/bin:/sbin:/usr/sbin:/opt/csw/sbin
PHP_LIB=$PKG_INSTALL_ROOT/opt/csw/php4/lib
PHP_BIN=$PKG_INSTALL_ROOT/opt/csw/php4/bin
PHP_INI=$PHP_LIB/php.ini
+extdir=`${PHP_BIN}/php-config --extension-dir`
if [ ! -f $PHP_INI ]; then
cp -p $PHP_INI.CSW $PHP_INI
else
echo "php.ini already exists"
+ curextdir=`perl -ne 's|extension_dir = "(.*no-debug-non-zts-[0-9]+)"|$1| && print' $PHP_INI`
- extdir=`${PHP_BIN}/php-config --extension-dir`
- curextdir=`perl -lne '/(no-debug-non-zts-[0-9]+)/ && print $1' $PHP_INI`
-
if [ "$extdir" != "$curextdir" ]; then
echo "updating extension_dir..."
- perl -i.bak -plne "s,no-debug-non-zts-[0-9]+,$extdir," $PHP_INI
+ perl -i.bak -plne "s|extension_dir = .*|extension_dir = $extdir|" $PHP_INI
fi
fi
@@ -29,7 +28,7 @@
_EOT_
-if [ ! -d "${extdir}" ]; then
+if [ ! -d ${extdir} ]; then
mkdir -p ${extdir}
for dir in `${PHP_BIN}/php-config --extension-dir |\
awk -F'/' '{print $(NF-1), $NF}'`; do
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list