This commit is contained in:
2026-09-11 21:57:55 +08:00
parent 36ca82c1b4
commit 73f58ced9a
32 changed files with 59 additions and 59 deletions

View File

@@ -48,7 +48,7 @@ Install_gogs()
git config --global push.default simple
if [ "darwin" == "$os" ];then
if [ "darwin" = "$os" ];then
file=gogs_${version}_darwin_amd64.zip
else
file=gogs_${version}_linux_amd64.zip

View File

@@ -18,11 +18,11 @@ sysName=`uname`
echo "use system: ${sysName}"
OSNAME=`bash ${rootPath}/scripts/getos.sh`
if [ "" == "$OSNAME" ];then
if [ "" = "$OSNAME" ];then
OSNAME=`cat ${rootPath}/data/osname.pl`
fi
if [ "macos" == "$OSNAME" ];then
if [ "macos" = "$OSNAME" ];then
echo "不支持Macox"
exit
fi
@@ -78,7 +78,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -26,12 +26,12 @@ Install_App()
LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
LOCAL_ADDR=cn
fi
if [ "${LOCAL_ADDR}" == "cn" ];then
if [ "${LOCAL_ADDR}" = "cn" ];then
if [ ! -f ${APP_DIR}/haproxy-${VERSION}.tar.gz ];then
wget -O ${APP_DIR}/haproxy-${VERSION}.tar.gz https://dl.midoks.icu/soft/haproxy/haproxy-${VERSION}.tar.gz
fi
@@ -94,7 +94,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -26,7 +26,7 @@ Install_App()
LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 -s http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
LOCAL_ADDR=cn
fi

View File

@@ -17,11 +17,11 @@ sysArch=`arch`
sysName=`uname`
ARCH_NAME=amd64
if [ "$sysArch" == "arm64" ];then
if [ "$sysArch" = "arm64" ];then
ARCH_NAME=arm64
elif [ "$sysArch" == "x86_64" ]; then
elif [ "$sysArch" = "x86_64" ]; then
ARCH_NAME=amd64
elif [ "$sysArch" == "aarch64" ]; then
elif [ "$sysArch" = "aarch64" ]; then
ARCH_NAME=aarch64
fi
@@ -77,7 +77,7 @@ curl -v -H "Content-Type: application/json" -XPOST "http://localhost:3100/loki/
-d "{\"streams\": [{\"stream\": {\"test\": \"test\"}, \"values\": [[\"$timestamp\", \"test message\"]]}]}"
action=${1}
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -64,7 +64,7 @@ Uninstall_App()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -57,7 +57,7 @@ Install_mysql()
COMMUNITY_INSTALL
if [ "$?" == "0" ];then
if [ "$?" = "0" ];then
mkdir -p $serverPath/mysql-community
echo '8.0' > $serverPath/mysql-community/version.pl
echo '安装完成'
@@ -76,7 +76,7 @@ Uninstall_mysql()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_mysql
else
Uninstall_mysql

View File

@@ -73,7 +73,7 @@ Uninstall_mysql()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_mysql
else
Uninstall_mysql

View File

@@ -107,7 +107,7 @@ Install_mysql()
md5_mysql_ok=acabc8aa764a94a8b10f90284c6e60c5
if [ -f ${mysqlDir}/mysql-${VERSION}.tar.gz ];then
md5_mysql=`md5sum ${mysqlDir}/mysql-${VERSION}.tar.gz | awk '{print $1}'`
if [ "${md5_mysql_ok}" == "${md5_mysql}" ]; then
if [ "${md5_mysql_ok}" = "${md5_mysql}" ]; then
echo "mysql9.3 file check ok"
else
# 重新下载

View File

@@ -132,7 +132,7 @@ Install_mysql()
WHERE_DIR_GCC=/usr/bin/gcc
WHERE_DIR_GPP=/usr/bin/g++
if [ "$OSNAME" == "centos" ] && [ "$VERSION_ID" == "7" ];then
if [ "$OSNAME" = "centos" ] && [ "$VERSION_ID" = "7" ];then
yum install -y libudev-devel
yum install -y centos-release-scl
yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-binutils
@@ -144,7 +144,7 @@ Install_mysql()
echo $WHERE_DIR_GPP
fi
if [ "$OSNAME" == "ubuntu" ];then
if [ "$OSNAME" = "ubuntu" ];then
apt install -y libudev-dev
apt install -y libtirpc-dev
apt install -y libssl-dev

View File

@@ -134,7 +134,7 @@ Uninstall_App(){
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_App
else
Uninstall_App

View File

@@ -144,7 +144,7 @@ Install_openresty()
cd ${openrestyDir} && wget -O $openrestyDir/zstd-nginx-module.tar.gz https://github.com/tokers/zstd-nginx-module/archive/refs/heads/master.tar.gz
cd ${openrestyDir} && tar -zxvf zstd-nginx-module.tar.gz
if [ "$sysName" == "Darwin" ];then
if [ "$sysName" = "Darwin" ];then
export ZSTD_INC=/opt/homebrew/include
export ZSTD_LIB=/opt/homebrew/lib
fi

View File

@@ -20,7 +20,7 @@ openrestyDir=${serverPath}/source/openresty
Install_openresty()
{
if [ "${action}" == "install" ];then
if [ "${action}" = "install" ];then
if [ -d $serverPath/openresty ];then
exit 0
fi
@@ -210,9 +210,9 @@ Uninstall_openresty()
}
action=$1
if [ "${1}" == "install" ];then
if [ "${1}" = "install" ];then
Install_openresty
elif [ "${1}" == "upgrade" ];then
elif [ "${1}" = "upgrade" ];then
Install_openresty
else
Uninstall_openresty

View File

@@ -20,7 +20,7 @@ openrestyDir=${serverPath}/source/openresty
Install_openresty()
{
if [ "${action}" == "install" ];then
if [ "${action}" = "install" ];then
if [ -d $serverPath/openresty ];then
exit 0
fi
@@ -219,9 +219,9 @@ Uninstall_openresty()
}
action=$1
if [ "${1}" == "install" ];then
if [ "${1}" = "install" ];then
Install_openresty
elif [ "${1}" == "upgrade" ];then
elif [ "${1}" = "upgrade" ];then
Install_openresty
else
Uninstall_openresty

View File

@@ -75,7 +75,7 @@ Install_openresty()
opensslVersion="3.4.4"
libresslVersion="3.9.1"
pcreVersion='8.45'
if [ "$sysName" == "Darwin" ];then
if [ "$sysName" = "Darwin" ];then
if [ ! -f ${openrestyDir}/pcre-${pcreVersion}.tar.gz ];then
wget --no-check-certificate -O ${openrestyDir}/pcre-${pcreVersion}.tar.gz https://netix.dl.sourceforge.net/project/pcre/pcre/${pcreVersion}/pcre-${pcreVersion}.tar.gz
@@ -205,7 +205,7 @@ Uninstall_openresty()
}
action=$1
if [ "${1}" == 'install' ];then
if [ "${1}" = 'install' ];then
Install_openresty
else
Uninstall_openresty

View File

@@ -24,7 +24,7 @@ fi
action=$1
type=$2
if [ "${2}" == "" ];then
if [ "${2}" = "" ];then
echo '缺少安装脚本...'
exit 0
fi
@@ -53,7 +53,7 @@ fi
cd ${curPath} && sh -x $curPath/versions/$2/install.sh $1
if [ "${action}" == "install" ] && [ -d ${serverPath}/php/${type} ];then
if [ "${action}" = "install" ] && [ -d ${serverPath}/php/${type} ];then
#初始化
cd ${rootPath} && python3 ${rootPath}/plugins/php/index.py start ${type}

View File

@@ -17,7 +17,7 @@ SOURCE_ROOT=$rootPath/source/lib
HTTP_PREFIX="https://"
LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
LOCAL_ADDR=cn
HTTP_PREFIX="https://mirror.ghproxy.com/"
fi

View File

@@ -18,7 +18,7 @@ mkdir -p $SOURCE_ROOT
HTTP_PREFIX="https://"
LOCAL_ADDR=common
cn=$(curl -fsSL -m 10 http://ipinfo.io/json | grep "\"country\": \"CN\"")
if [ ! -z "$cn" ] || [ "$?" == "0" ] ;then
if [ ! -z "$cn" ] || [ "$?" = "0" ] ;then
LOCAL_ADDR=cn
HTTP_PREFIX="https://mirror.ghproxy.com/"
fi
@@ -28,7 +28,7 @@ if [ ! -d ${SERVER_ROOT}/zlib ];then
cd $SOURCE_ROOT
if [ "$LOCAL_ADDR" == 'cn' ];then
if [ "$LOCAL_ADDR" = 'cn' ];then
if [ ! -f ${SOURCE_ROOT}/${SOURCE_ROOT}/zlib-1.2.11.tar.gz ];then
wget --no-check-certificate -O ${SOURCE_ROOT}/zlib-1.2.11.tar.gz https://dl.midoks.icu/lib/zlib-1.2.11.tar.gz -T 20
fi

View File

@@ -21,7 +21,7 @@ NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-deb
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
sysName=`uname`
if [ "$sysName" == "Darwin" ];then
if [ "$sysName" = "Darwin" ];then
BAK='_bak'
else
BAK=''

View File

@@ -93,8 +93,8 @@ Uninstall_lib()
}
if [ "$actionType" == 'install' ];then
if [ "$actionType" = 'install' ];then
Install_lib
elif [ "$actionType" == 'uninstall' ];then
elif [ "$actionType" = 'uninstall' ];then
Uninstall_lib
fi

View File

@@ -21,7 +21,7 @@ version=$2
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts`
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
if [ "$sysName" == "Darwin" ];then
if [ "$sysName" = "Darwin" ];then
BAK='_bak'
else
BAK=''
@@ -87,8 +87,8 @@ Uninstall_lib()
}
if [ "$actionType" == 'install' ];then
if [ "$actionType" = 'install' ];then
Install_lib
elif [ "$actionType" == 'uninstall' ];then
elif [ "$actionType" = 'uninstall' ];then
Uninstall_lib
fi

View File

@@ -97,8 +97,8 @@ Uninstall_lib()
if [ "$actionType" == 'install' ];then
if [ "$actionType" = 'install' ];then
Install_lib
elif [ "$actionType" == 'uninstall' ];then
elif [ "$actionType" = 'uninstall' ];then
Uninstall_lib
fi

View File

@@ -115,8 +115,8 @@ Uninstall_lib()
if [ "$actionType" == 'install' ];then
if [ "$actionType" = 'install' ];then
Install_lib
elif [ "$actionType" == 'uninstall' ];then
elif [ "$actionType" = 'uninstall' ];then
Uninstall_lib
fi

View File

@@ -31,7 +31,7 @@ fi
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/${LIB_PATH_NAME}/extensions | grep no-debug-non-zts`
extFile=$serverPath/php/${version}/${LIB_PATH_NAME}/extensions/${NON_ZTS_FILENAME}/${_LIBNAME}.so
if [ "$sysName" == "Darwin" ];then
if [ "$sysName" = "Darwin" ];then
BAK='_bak'
else
BAK=''

View File

@@ -87,7 +87,7 @@ Install_lib()
exit
fi
if [ "$OSNAME" == 'macos' ];then
if [ "$OSNAME" = 'macos' ];then
xattr -c * $extFile
fi
fi

View File

@@ -28,7 +28,7 @@ fi
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/${LIB_PATH_NAME}/extensions | grep no-debug-non-zts`
extFile=$serverPath/php/${version}/${LIB_PATH_NAME}/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
if [ "$sysName" == "Darwin" ];then
if [ "$sysName" = "Darwin" ];then
BAK='_bak'
else
BAK=''
@@ -62,7 +62,7 @@ Install_lib()
OPTIONS=""
if [ "$sysName" == "Darwin" ];then
if [ "$sysName" = "Darwin" ];then
BREW_DIR=`which brew`
BREW_DIR=${BREW_DIR/\/bin\/brew/}
LIB_DEPEND_DIR=`brew info libsodium | grep ${BREW_DIR}/Cellar/libsodium | cut -d \ -f 1 | awk 'END {print}'`
@@ -118,8 +118,8 @@ Uninstall_lib()
}
if [ "$actionType" == 'install' ];then
if [ "$actionType" = 'install' ];then
Install_lib
elif [ "$actionType" == 'uninstall' ];then
elif [ "$actionType" = 'uninstall' ];then
Uninstall_lib
fi

View File

@@ -59,7 +59,7 @@ Install_lib()
cd $php_lib/${LIBNAME}-${LIBV}
OPTIONS=''
if [ "${SYS_ARCH}" == "aarch64" ] && [ "$version" -lt "56" ];then
if [ "${SYS_ARCH}" = "aarch64" ] && [ "$version" -lt "56" ];then
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
fi

View File

@@ -81,7 +81,7 @@ Install_lib()
cd $php_lib/${LIBNAME}-${LIBV}
OPTIONS=""
if [ "${SYS_ARCH}" == "aarch64" ] && [ "$version" -lt "56" ];then
if [ "${SYS_ARCH}" = "aarch64" ] && [ "$version" -lt "56" ];then
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
fi

View File

@@ -17,7 +17,7 @@ sysName=`uname`
actionType=$1
version=$2
if [ "$version" == "85" ];then
if [ "$version" = "85" ];then
echo "not need"
exit 1
fi
@@ -72,7 +72,7 @@ Install_lib()
cd $php_lib/${LIBNAME}-${LIBV}
OPTIONS=""
if [ "${SYS_ARCH}" == "aarch64" ] && [ "$version" -lt "56" ];then
if [ "${SYS_ARCH}" = "aarch64" ] && [ "$version" -lt "56" ];then
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
fi

View File

@@ -29,7 +29,7 @@ fi
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/${LIB_PATH_NAME}/extensions | grep no-debug-non-zts`
extFile=$serverPath/php/${version}/${LIB_PATH_NAME}/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so
if [ "$sysName" == "Darwin" ];then
if [ "$sysName" = "Darwin" ];then
BAK='_bak'
else
BAK=''
@@ -56,7 +56,7 @@ Install_lib()
cd $php_lib/${LIBNAME}-${LIBV}/extension
OPTIONS=''
if [ "${SYS_ARCH}" == "aarch64" ] && [ "$version" -lt "56" ];then
if [ "${SYS_ARCH}" = "aarch64" ] && [ "$version" -lt "56" ];then
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
fi

View File

@@ -54,11 +54,11 @@ Install_lib()
cd $php_lib/${LIBNAME}-${LIBV}
OPTIONS=''
if [ "${SYS_ARCH}" == "aarch64" ] && [ "$version" -lt "56" ];then
if [ "${SYS_ARCH}" = "aarch64" ] && [ "$version" -lt "56" ];then
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
fi
if [ $sysName == 'Darwin' ]; then
if [ $sysName = 'Darwin' ]; then
BREW_DIR=`which brew`
BREW_DIR=${BREW_DIR/\/bin\/brew/}
LIB_DEPEND_DIR=`brew info libyaml | grep ${BREW_DIR}/Cellar/libyaml | cut -d \ -f 1 | awk 'END {print}'`

View File

@@ -58,7 +58,7 @@ Install_lib()
cd $php_lib/${LIBNAME}-${LIBV}
OPTIONS=''
if [ "${SYS_ARCH}" == "aarch64" ] && [ "$version" -lt "56" ];then
if [ "${SYS_ARCH}" = "aarch64" ] && [ "$version" -lt "56" ];then
OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu"
fi