File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,7 +41,11 @@ php${PHP_VER}-xml
4141php${PHP_VER} -zip"
4242
4343# PHP 8.5+ has opcache built-in; older versions need the separate package
44- if [[ " $( echo " ${PHP_VER} < 8.5" | bc -l) " -eq 1 ]]; then
44+ # Convert PHP_VER (e.g. "8.4") into an integer (e.g. 84) for numeric comparison
45+ php_major=${PHP_VER%% .* }
46+ php_minor=${PHP_VER#* .}
47+ php_ver_int=$(( php_major * 10 + php_minor))
48+ if (( php_ver_int < 85 )) ; then
4549 php_packages=" ${php_packages}
4650php${PHP_VER} -opcache"
4751fi
Original file line number Diff line number Diff line change @@ -87,7 +87,9 @@ php${NEW_PHP_VER}-xml
8787php${NEW_PHP_VER} -zip"
8888
8989# PHP 8.5+ has opcache built-in; older versions need the separate package
90- if [[ " $( echo " ${NEW_PHP_VER} < 8.5" | bc -l) " -eq 1 ]]; then
90+ php_major=" ${NEW_PHP_VER%% .* } "
91+ php_minor=" ${NEW_PHP_VER#* .} "
92+ if (( php_major < 8 || (php_major == 8 && php_minor < 5 ) )) ; then
9193 php_packages=" ${php_packages}
9294php${NEW_PHP_VER} -opcache"
9395fi
Original file line number Diff line number Diff line change @@ -53,8 +53,7 @@ print_last_errors
5353debug_pause " phpMyAdmin"
5454
5555# Update WP-CLI
56- echo " y" | wp cli update --stable --allow-root 2>> /tmp/enginescript_install_errors.log
57- echo " y" | wp package update --allow-root 2>> /tmp/enginescript_install_errors.log
56+ /usr/local/bin/enginescript/scripts/update/wp-cli-update.sh 2>> /tmp/enginescript_install_errors.log
5857print_last_errors
5958debug_pause " WP-CLI"
6059
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ source /usr/local/bin/enginescript/scripts/functions/shared/enginescript-common.
2121# ----------------------------------------------------------------------------
2222
2323# Update WP-CLI
24- echo " y " | wp cli update --stable --allow-root 2>> /tmp/enginescript_install_errors.log
25- echo " y " | wp package update --allow-root 2>> /tmp/enginescript_install_errors.log
24+ wp cli update --stable --allow-root --yes 2>> /tmp/enginescript_install_errors.log
25+ wp package update --allow-root --yes 2>> /tmp/enginescript_install_errors.log
2626print_last_errors
2727debug_pause " WP-CLI Update"
You can’t perform that action at this time.
0 commit comments