fix symlink error
This commit is contained in:
10
install
10
install
@@ -329,18 +329,18 @@ wo_update_wp_cli()
|
|||||||
{
|
{
|
||||||
|
|
||||||
WP_CLI_PATH=$(command -v wp)
|
WP_CLI_PATH=$(command -v wp)
|
||||||
if [ -n "$WP_CLI_PATH" ]; then
|
if [ "$WP_CLI_PATH" != "/usr/local/bin/wp" ]; then
|
||||||
rm -rf "$WP_CLI_PATH"
|
rm -rf "$WP_CLI_PATH"
|
||||||
# Update WP-CLI to the most recent version
|
# Update WP-CLI to the most recent version
|
||||||
wget -qO /usr/local/bin/wp https://raw.githubusercontent.com/WordOps/wpcli-builds/gh-pages/phar/wp-cli.phar
|
wget -qO /usr/local/bin/wp https://raw.githubusercontent.com/WordOps/wpcli-builds/gh-pages/phar/wp-cli.phar
|
||||||
chmod +x /usr/local/bin/wp
|
chmod +x /usr/local/bin/wp
|
||||||
ln -s /usr/local/bin/wp /usr/bin/
|
|
||||||
else
|
else
|
||||||
wget -qO /usr/local/bin/wp https://raw.githubusercontent.com/WordOps/wpcli-builds/gh-pages/phar/wp-cli.phar
|
wget -qO /usr/local/bin/wp https://raw.githubusercontent.com/WordOps/wpcli-builds/gh-pages/phar/wp-cli.phar
|
||||||
chmod +x /usr/local/bin/wp
|
chmod +x /usr/local/bin/wp
|
||||||
ln -s /usr/local/bin/wp /usr/bin/
|
|
||||||
fi
|
fi
|
||||||
|
[ ! -x /usr/bin/wp ] && {
|
||||||
|
ln -s /usr/local/bin/wp /usr/bin/
|
||||||
|
}
|
||||||
[ -d /etc/bash_completion.d ] && {
|
[ -d /etc/bash_completion.d ] && {
|
||||||
wget -qO /etc/bash_completion.d/wp-completion.bash https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash
|
wget -qO /etc/bash_completion.d/wp-completion.bash https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash
|
||||||
}
|
}
|
||||||
@@ -695,7 +695,7 @@ else
|
|||||||
secure_wo_db | tee -ai $wo_install_log
|
secure_wo_db | tee -ai $wo_install_log
|
||||||
wo_git_init | tee -ai $wo_install_log
|
wo_git_init | tee -ai $wo_install_log
|
||||||
wo_update_wp_cli | tee -ai $wo_install_log
|
wo_update_wp_cli | tee -ai $wo_install_log
|
||||||
echo -ne "${TPUT_ECHO}Installing Wordops $wo_branch ${TPUT_RESET}[OK]\r"
|
echo -ne "${TPUT_ECHO}Running post-install steps ${TPUT_RESET}[OK]\r"
|
||||||
echo -ne '\n'
|
echo -ne '\n'
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user