do not update package list with flag --travis
This commit is contained in:
65
install
65
install
@@ -51,6 +51,31 @@ wo_lib_error() {
|
||||
exit "$2"
|
||||
}
|
||||
|
||||
###
|
||||
# 1 - script argument parsing
|
||||
###
|
||||
|
||||
while [ "$#" -gt 0 ]; do
|
||||
case "$1" in
|
||||
-b | --branch)
|
||||
wo_branch="$2"
|
||||
shift
|
||||
;;
|
||||
-p | --preserve)
|
||||
wo_preserve_config="y"
|
||||
;;
|
||||
--force)
|
||||
wo_force_install="y"
|
||||
;;
|
||||
--travis)
|
||||
wo_travis="y"
|
||||
;;
|
||||
*) # positional args
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
###
|
||||
# 1 - Check whether the installation is called with elevated rights
|
||||
###
|
||||
@@ -67,8 +92,10 @@ echo ""
|
||||
###
|
||||
# 1- Update the apt sewers with fresh info
|
||||
###
|
||||
[ -z "$wo_travis" ] && {
|
||||
wo_lib_echo "Updating apt-get repository info"
|
||||
apt-get update -qq
|
||||
}
|
||||
|
||||
###
|
||||
# 1- Check whether lsb_release is installed, and if not, install it
|
||||
@@ -78,24 +105,6 @@ if [ -z "$(command -v lsb_release)" ]; then
|
||||
apt-get -y install lsb-release -qq
|
||||
fi
|
||||
|
||||
while [ "$#" -gt 0 ]; do
|
||||
case "$1" in
|
||||
-b | --branch)
|
||||
wo_branch="$2"
|
||||
shift
|
||||
;;
|
||||
-p | --preserve)
|
||||
wo_preserve_config="y"
|
||||
;;
|
||||
--force)
|
||||
wo_force_install="y"
|
||||
;;
|
||||
*) # positional args
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
###
|
||||
# 1 - Define variables for later use
|
||||
###
|
||||
@@ -124,19 +133,19 @@ fi
|
||||
# 1 - Checking linux distro
|
||||
###
|
||||
if [ -z "$wo_force_install" ]; then
|
||||
if [ "$wo_linux_distro" != "Ubuntu" ] && [ "$wo_linux_distro" != "Debian" ]; then
|
||||
wo_lib_echo_fail "WordOps (wo) only supports Ubuntu and Debian at the moment."
|
||||
wo_lib_echo_fail "If you are feeling adventurous, you are free to fork WordOps to support"
|
||||
wo_lib_echo_fail "other Linux distributions and perhaps even Unix deratives."
|
||||
exit 100
|
||||
else
|
||||
check_wo_linux_distro=$(lsb_release -sc | grep -E "trusty|xenial|bionic|jessie|stretch")
|
||||
if [ -z "$check_wo_linux_distro" ]; then
|
||||
wo_lib_echo_fail "WordOps (wo) only supports Ubuntu 14.04/16.04/18.04, Debian 8.x and Debian 9.x"
|
||||
if [ "$wo_linux_distro" != "Ubuntu" ] && [ "$wo_linux_distro" != "Debian" ]; then
|
||||
wo_lib_echo_fail "WordOps (wo) only supports Ubuntu and Debian at the moment."
|
||||
wo_lib_echo_fail "If you are feeling adventurous, you are free to fork WordOps to support"
|
||||
wo_lib_echo_fail "other Linux distributions and perhaps even Unix deratives."
|
||||
exit 100
|
||||
else
|
||||
check_wo_linux_distro=$(lsb_release -sc | grep -E "trusty|xenial|bionic|jessie|stretch")
|
||||
if [ -z "$check_wo_linux_distro" ]; then
|
||||
wo_lib_echo_fail "WordOps (wo) only supports Ubuntu 14.04/16.04/18.04, Debian 8.x and Debian 9.x"
|
||||
exit 100
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
###
|
||||
# 1 - To prevent errors or unexpected behaviour, create the log and ACL it
|
||||
|
||||
Reference in New Issue
Block a user