php更新脚本出错

问答中心分类: Linuxphp更新脚本出错
baifjece asked 7 年 ago

Upgrade_PHP() {
pushd ${oneinstack_dir}/src > /dev/null
[ ! -e "${php_install_dir}" ] && echo "${CWARNING}PHP is not installed on your system! ${CEND}" && exit 1
echo
OLD_PHP_version=`${php_install_dir}/bin/php -r 'echo PHP_VERSION;'`
echo "Current PHP Version: ${CMSG}$OLD_PHP_version${CEND}"
while :; do echo
read -p "Please input upgrade PHP Version: " NEW_PHP_version
if [ "${NEW_PHP_version%.*}" == "${OLD_PHP_version%.*}" ]; then
[ ! -e "php-${NEW_PHP_version}.tar.gz" ] && wget --no-check-certificate -c

上面的等号错了,应该是不等号,

Question Tags:

1 Answers
oneinstack answered 7 年 ago
没错,考虑到兼容性,默认精致垮大版本升级,7.0.26 只能升级到7.0.27 不能直接升级到7.1.13