Skip update check if AUTOUPDATE is enabled

This commit is contained in:
Alex Malinovich 2016-11-29 15:47:52 -08:00
commit 56e63e5fa0

View file

@ -64,7 +64,6 @@ AUTODELETE=no
AUTOUPDATE=no AUTOUPDATE=no
AUTOSTART=no AUTOSTART=no
ARCH=$(uname -m) ARCH=$(uname -m)
IGNOREAUTOUPDATE=no
SHOWPROGRESS=no SHOWPROGRESS=no
WGETOPTIONS="" # extra options for wget. Used for progress bar. WGETOPTIONS="" # extra options for wget. Used for progress bar.
CHECKUPDATE=yes CHECKUPDATE=yes
@ -261,7 +260,7 @@ do
(-r) PRINT_URL=yes;; (-r) PRINT_URL=yes;;
(-s) AUTOSTART=yes;; (-s) AUTOSTART=yes;;
(-u) AUTOUPDATE=yes;; (-u) AUTOUPDATE=yes;;
(-U) IGNOREAUTOUPDATE=yes;; (-U) AUTOUPDATE=no;;
(-v) VERBOSE=yes;; (-v) VERBOSE=yes;;
(--config) shift;; #gobble up the paramater and silently continue parsing (--config) shift;; #gobble up the paramater and silently continue parsing
@ -292,10 +291,6 @@ if [ "${SHOWPROGRESS}" = "yes" ]; then
fi fi
fi fi
if [ "${IGNOREAUTOUPDATE}" = "yes" ]; then
AUTOUPDATE=no
fi
if [ "${CRON}" = "yes" ]; then if [ "${CRON}" = "yes" ]; then
error "CRON has been deprecated, please use cronwrapper (see README.md)" error "CRON has been deprecated, please use cronwrapper (see README.md)"
exit 255 exit 255
@ -405,7 +400,7 @@ else
fi fi
fi fi
if [ "${CHECKUPDATE}" = "yes" ]; then if [ "${CHECKUPDATE}" = "yes" -a "${AUTOUPDATE}" = "no" ]; then
(wget -q "$UPSTREAM_GIT_URL" -O - 2>/dev/null || echo ERROR) | sha1sum >"${FILE_REMOTE}" 2>/dev/null (wget -q "$UPSTREAM_GIT_URL" -O - 2>/dev/null || echo ERROR) | sha1sum >"${FILE_REMOTE}" 2>/dev/null
ERR1=$? ERR1=$?
(cat "$0" 2>/dev/null || echo ERROR) | sha1sum >"${FILE_LOCAL}" 2>/dev/null (cat "$0" 2>/dev/null || echo ERROR) | sha1sum >"${FILE_LOCAL}" 2>/dev/null