mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-20 13:23:21 -07:00
Deprecate FORCEALL
This commit is contained in:
parent
32b19dfbcb
commit
8383048c01
1 changed files with 15 additions and 28 deletions
|
@ -58,7 +58,6 @@ PLEXPORT=32400
|
||||||
# Defaults
|
# Defaults
|
||||||
# (aka "Advanced" settings, can be overriden with config file)
|
# (aka "Advanced" settings, can be overriden with config file)
|
||||||
FORCE=no
|
FORCE=no
|
||||||
FORCEALL=no
|
|
||||||
PUBLIC=no
|
PUBLIC=no
|
||||||
AUTOINSTALL=no
|
AUTOINSTALL=no
|
||||||
AUTODELETE=no
|
AUTODELETE=no
|
||||||
|
@ -86,7 +85,6 @@ usage() {
|
||||||
echo " -d Auto delete after auto install"
|
echo " -d Auto delete after auto install"
|
||||||
echo " -f Force download even if it's the same version or file"
|
echo " -f Force download even if it's the same version or file"
|
||||||
echo " already exists unless checksum passes"
|
echo " already exists unless checksum passes"
|
||||||
echo " -F Force download always"
|
|
||||||
echo " -h This help"
|
echo " -h This help"
|
||||||
echo " -l List available builds and distros"
|
echo " -l List available builds and distros"
|
||||||
echo " -p Public Plex Media Server version"
|
echo " -p Public Plex Media Server version"
|
||||||
|
@ -167,7 +165,7 @@ do
|
||||||
(-C) error "CRON option is deprecated, please use cronwrapper (see README.md)"; exit 255;;
|
(-C) error "CRON option is deprecated, please use cronwrapper (see README.md)"; exit 255;;
|
||||||
(-d) AUTODELETE=yes;;
|
(-d) AUTODELETE=yes;;
|
||||||
(-f) FORCE=yes;;
|
(-f) FORCE=yes;;
|
||||||
(-F) FORCEALL=yes;;
|
(-F) error "FORCEALL/-F option is deprecated, please use FORCE/-f instead"; exit 255;;
|
||||||
(-l) LISTOPTS=yes;;
|
(-l) LISTOPTS=yes;;
|
||||||
(-p) PUBLIC=yes;;
|
(-p) PUBLIC=yes;;
|
||||||
(-P) SHOWPROGRESS=yes;;
|
(-P) SHOWPROGRESS=yes;;
|
||||||
|
@ -220,6 +218,11 @@ if [ "${KEEP}" = "yes" ]; then
|
||||||
exit 255
|
exit 255
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${FORCEALL}" = "yes" ]; then
|
||||||
|
error "FORCEALL is deprecated, please use FORCE instead"
|
||||||
|
exit 255
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -z "${RELEASE}" ]; then
|
if [ ! -z "${RELEASE}" ]; then
|
||||||
error "RELEASE keyword is deprecated and should be removed from config file"
|
error "RELEASE keyword is deprecated and should be removed from config file"
|
||||||
error "Use DISTRO and BUILD instead to manually select what to install (check README.md)"
|
error "Use DISTRO and BUILD instead to manually select what to install (check README.md)"
|
||||||
|
@ -442,37 +445,21 @@ if [ "${CHECKONLY}" = "yes" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $FILENAME == *$INSTALLED_VERSION* ]] && [ "${FORCE}" != "yes" -a "${FORCEALL}" != "yes" ] && [ ! -z "${INSTALLED_VERSION}" ]; then
|
if [[ $FILENAME == *$INSTALLED_VERSION* ]] && [ "${FORCE}" != "yes" ] && [ ! -z "${INSTALLED_VERSION}" ]; then
|
||||||
info "Your OS reports the latest version of Plex ($INSTALLED_VERSION) is already installed. Use -f to force download."
|
info "Your OS reports the latest version of Plex ($INSTALLED_VERSION) is already installed. Use -f to force download."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "${DOWNLOADDIR}/${FILENAME}" ]; then
|
if [ -f "${DOWNLOADDIR}/${FILENAME}" -a "${FORCE}" != "yes" ]; then
|
||||||
if [ "${FORCE}" != "yes" -a "${FORCEALL}" != "yes" ]; then
|
if sha1sum --status -c "${FILE_SHA}"; then
|
||||||
sha1sum --status -c "${FILE_SHA}"
|
info "File already exists (${FILENAME}), won't download."
|
||||||
if [ $? -eq 0 ]; then
|
if [ "${AUTOINSTALL}" != "yes" ]; then
|
||||||
info "File already exists (${FILENAME}), won't download."
|
exit 0
|
||||||
if [ "${AUTOINSTALL}" != "yes" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
SKIP_DOWNLOAD="yes"
|
|
||||||
else
|
|
||||||
info "File exists but fails checksum. Redownloading."
|
|
||||||
SKIP_DOWNLOAD="no"
|
|
||||||
fi
|
fi
|
||||||
elif [ "${FORCEALL}" == "yes" ]; then
|
SKIP_DOWNLOAD="yes"
|
||||||
info "Note! File exists, but asked to overwrite with new copy"
|
|
||||||
else
|
else
|
||||||
sha1sum --status -c "${FILE_SHA}"
|
info "File exists but fails checksum. Redownloading."
|
||||||
if [ $? -ne 0 ]; then
|
SKIP_DOWNLOAD="no"
|
||||||
info "File exists but fails checksum. Redownloading."
|
|
||||||
else
|
|
||||||
info "File exists and checksum passes, won't redownload."
|
|
||||||
if [ "${AUTOINSTALL}" != "yes" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
SKIP_DOWNLOAD="yes"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue