fix symlink error

This commit is contained in:
VirtuBox
2019-03-07 18:11:32 +01:00
parent afba124e38
commit 29d5e630ab

10
install
View File

@@ -329,18 +329,18 @@ wo_update_wp_cli()
{
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"
# 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
chmod +x /usr/local/bin/wp
ln -s /usr/local/bin/wp /usr/bin/
else
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
ln -s /usr/local/bin/wp /usr/bin/
fi
[ ! -x /usr/bin/wp ] && {
ln -s /usr/local/bin/wp /usr/bin/
}
[ -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
}
@@ -695,7 +695,7 @@ else
secure_wo_db | tee -ai $wo_install_log
wo_git_init | 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'
fi
fi