From 44f3c95345139dc730ffe3b39a5ee6d73b06383c Mon Sep 17 00:00:00 2001 From: midoks Date: Sat, 26 Sep 2020 18:37:26 +0800 Subject: [PATCH] Update install.sh --- plugins/php/versions/52/install.sh | 36 +++++++++++++++++------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/plugins/php/versions/52/install.sh b/plugins/php/versions/52/install.sh index 042b25b78..26a8fc0e4 100755 --- a/plugins/php/versions/52/install.sh +++ b/plugins/php/versions/52/install.sh @@ -30,16 +30,16 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then fi -if [ -f $serverPath/php/53/bin/php.dSYM ];then - mv $serverPath/php/53/bin/php.dSYM $serverPath/php/53/bin/php +if [ -f $serverPath/php/${PHP_VER}/bin/php.dSYM ];then + mv $serverPath/php/${PHP_VER}/bin/php.dSYM $serverPath/php/${PHP_VER}/bin/php fi -if [ -f $serverPath/php/53/sbin/php-fpm.dSYM ];then - mv $serverPath/php/53/sbin/php-fpm.dSYM $serverPath/php/53/sbin/php-fpm +if [ -f $serverPath/php/${PHP_VER}/sbin/php-fpm.dSYM ];then + mv $serverPath/php/${PHP_VER}/sbin/php-fpm.dSYM $serverPath/php/${PHP_VER}/sbin/php-fpm fi -if [ -f $serverPath/php/53/bin/php ];then +if [ -f $serverPath/php/${PHP_VER}/bin/php ];then return fi @@ -56,11 +56,11 @@ else fi -if [ ! -d $serverPath/php/53 ];then +if [ ! -d $serverPath/php/${PHP_VER} ];then cd $sourcePath/php/php${PHP_VER} && ./configure \ - --prefix=$serverPath/php/53 \ - --exec-prefix=$serverPath/php/53 \ - --with-config-file-path=$serverPath/php/53/etc \ + --prefix=$serverPath/php/${PHP_VER} \ + --exec-prefix=$serverPath/php/${PHP_VER} \ + --with-config-file-path=$serverPath/php/${PHP_VER}/etc \ --with-zlib-dir=$serverPath/lib/zlib \ --enable-zip \ --enable-exif \ @@ -89,12 +89,16 @@ if [ ! -d $serverPath/php/53 ];then fi -if [ -f $serverPath/php/53/bin/php.dSYM ];then - mv $serverPath/php/53/bin/php.dSYM $serverPath/php/53/bin/php +if [ -f $serverPath/php/${PHP_VER}/bin/php.dSYM ];then + mv $serverPath/php/${PHP_VER}/bin/php.dSYM $serverPath/php/${PHP_VER}/bin/php fi -if [ -f $serverPath/php/53/sbin/php-fpm.dSYM ];then - mv $serverPath/php/53/sbin/php-fpm.dSYM $serverPath/php/53/sbin/php-fpm +if [ -f $serverPath/php/${PHP_VER}/sbin/php-fpm.dSYM ];then + mv $serverPath/php/${PHP_VER}/sbin/php-fpm.dSYM $serverPath/php/${PHP_VER}/sbin/php-fpm +fi + +if [ ! -d $serverPath/php/${PHP_VER}/lib/php/extensions/no-debug-non-zts-20060613 ]; then + mkdir -p $serverPath/php/${PHP_VER}/lib/php/extensions/no-debug-non-zts-20060613 fi #------------------------ install end ------------------------------------# @@ -104,9 +108,9 @@ fi Uninstall_php() { - $serverPath/php/init.d/php53 stop - rm -rf $serverPath/php/53 - echo "uninstall php-5.3.29 ..." > $install_tmp + $serverPath/php/init.d/php${PHP_VER} stop + rm -rf $serverPath/php/${PHP_VER} + echo "uninstall php-${version} ..." > $install_tmp } action=${1}