Browse Source

update install script

hotfix/v3.3.15
harshadyeola 9 years ago
parent
commit
16cd70dfaa
  1. 8
      install

8
install

@ -228,12 +228,14 @@ function ee_update_wp_cli()
ee_lib_echo "Updating WP-CLI version to resolve compatibility issue." ee_lib_echo "Updating WP-CLI version to resolve compatibility issue."
PHP_PATH=$(which php) PHP_PATH=$(which php)
WP_CLI_PATH=$(which wp) WP_CLI_PATH=$(which wp)
if [ "${WP_CLI_PATH}" != "" ]; then if [ "${WP_CLI_PATH}" != "" ]; then
# Get WP-CLI version # Get WP-CLI version
WP_CLI_VERSION=$(${PHP_PATH} ${WP_CLI_PATH} --allow-root cli version | awk '{ print $2 }') WP_CLI_VERSION=$(${PHP_PATH} ${WP_CLI_PATH} --allow-root cli version | awk '{ print $2 }')
if [ "${WP_CLI_VERSION}" -lt "0.21.1" ]; then dpkg --compare-versions ${WP_CLI_VERSION} lt 0.21.1
echo "y" | ee stack upgrade --wpcli # Update WP-CLI version
if [ "$?" == "0" ]; then
wget -qO ${WP_CLI_PATH} https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x ${WP_CLI_PATH}
fi fi
fi fi
} }

Loading…
Cancel
Save