Update updater.sh

This commit is contained in:
earthlng 2018-11-20 14:15:37 +00:00 committed by GitHub
parent 5c969c413c
commit afbeff7e85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,21 +62,22 @@ legacy_argument () {
echo -e "Please view the new options using the -h argument."${NC} echo -e "Please view the new options using the -h argument."${NC}
} }
# Arguement defaults # Argument defaults
UPDATE="check" UPDATE="check"
CONFIRM="yes" CONFIRM="yes"
OVERRIDE="user-overrides.js" OVERRIDE="user-overrides.js"
BACKUP="multiple" BACKUP="multiple"
MINIFY="false" MINIFY="false"
if [ $# != 0 ]; then if [ $# != 0 ]; then
legacy_lc="$(echo $1 | tr '[A-Z]' '[a-z]')"
# Display usage if first arguement is -help or --help # Display usage if first arguement is -help or --help
if [ $1 = "--help" ] || [ $1 = "-help" ]; then if [ $1 = "--help" ] || [ $1 = "-help" ]; then
usage usage
elif [ $1 = "-donotupdate" ]; then elif [ $legacy_lc = "-donotupdate" ]; then
UPDATE="no" UPDATE="no"
legacy_argument $1 legacy_argument $1
elif [ $1 = "-update" ]; then elif [ $legacy_lc = "-update" ]; then
UPDATE="yes" UPDATE="yes"
legacy_argument $1 legacy_argument $1
else else