Simplify install script

This commit is contained in:
VirtuBox
2019-08-29 23:17:18 +02:00
parent 4ac33ba026
commit 05112d7f7d

20
install
View File

@@ -802,9 +802,12 @@ if [ "$wo_purge" = "y" ]; then
else else
# 1 - WO already installed # 1 - WO already installed
if [ -x /usr/local/bin/wo ]; then if [ -x /usr/local/bin/wo ]; then
if ! { if {
wo -v 2>&1 | grep -q "$wo_version_new" wo -v 2>&1 | grep -q "$wo_version_new"
} || [ "$wo_force_install" = "y" ]; then } && [ -z "$wo_force_install" ]; then
wo_lib_error "You already have WordOps $wo_version_new"
exit 1
fi
wo_lib_echo "Installing wo dependencies " | tee -ai $wo_install_log wo_lib_echo "Installing wo dependencies " | tee -ai $wo_install_log
wo_install_dep | tee -ai $wo_install_log wo_install_dep | tee -ai $wo_install_log
wo_timesync | tee -ai $wo_install_log wo_timesync | tee -ai $wo_install_log
@@ -843,18 +846,16 @@ else
wo_domain_suffix | tee -ai $wo_install_log wo_domain_suffix | tee -ai $wo_install_log
wo_lib_echo "Running post-install steps " | tee -ai $wo_install_log wo_lib_echo "Running post-install steps " | tee -ai $wo_install_log
wo_update_wp_cli | tee -ai $wo_install_log wo_update_wp_cli | tee -ai $wo_install_log
else
wo_lib_error "You already have WordOps $wo_version_new, exit status = " 1
fi
else else
# 2 - Migration from EEv3 # 2 - Migration from EEv3
if [ -x /usr/local/bin/ee ]; then if [ -x /usr/local/bin/ee ]; then
if [ -z "$wo_force_install" ]; then if [ -z "$wo_force_install" ]; then
echo -e "Migrate from EasyEngine to WordOps (y/n): " && read -r WO_ANSWER echo -e "Migrate from EasyEngine to WordOps (y/n): " && read -r WO_ANSWER
else if [ "$WO_ANSWER" != "y" ] && [ "$WO_ANSWER" != "Y" ]; then
WO_ANSWER="y" wo_lib_error "Not installing WordOps, exit status = " 1
exit 1
fi
fi fi
if [ "$WO_ANSWER" = "y" ] || [ "$WO_ANSWER" = "Y" ]; then
wo_lib_echo "Installing wo dependencies " | tee -ai $wo_install_log wo_lib_echo "Installing wo dependencies " | tee -ai $wo_install_log
wo_install_dep | tee -ai $wo_install_log wo_install_dep | tee -ai $wo_install_log
wo_timesync | tee -ai $wo_install_log wo_timesync | tee -ai $wo_install_log
@@ -897,9 +898,6 @@ else
wo_cheat_alias | tee -ai $wo_install_log wo_cheat_alias | tee -ai $wo_install_log
wo_lib_echo "Cleaning-up EE previous install" | tee -ai $wo_install_log wo_lib_echo "Cleaning-up EE previous install" | tee -ai $wo_install_log
wo_clean_ee | tee -ai $wo_install_log wo_clean_ee | tee -ai $wo_install_log
else
wo_lib_error "Not installing WordOps, exit status = " 1
fi
else else
# 3 - Fresh WO setup # 3 - Fresh WO setup
wo_lib_echo "Installing wo dependencies " | tee -ai $wo_install_log wo_lib_echo "Installing wo dependencies " | tee -ai $wo_install_log