mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-19 12:59:40 -07:00
Add verbose output for version checking
This commit is contained in:
parent
fa32df4497
commit
5067fc91dc
2 changed files with 10 additions and 5 deletions
|
@ -240,6 +240,14 @@ getPlexVersion() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
verboseOutput() {
|
||||||
|
if [ "$VERBOSE" = "yes" ]; then
|
||||||
|
for i in $@; do
|
||||||
|
info "$i=${!i}"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Shared functions
|
# Shared functions
|
||||||
|
|
||||||
# SHARED
|
# SHARED
|
||||||
|
|
|
@ -385,11 +385,7 @@ RELEASE=$(grep -ioe '"label"[^}]*' <<<"${wgetresults}" | grep -i "\"distro\":\"$
|
||||||
DOWNLOAD=$(echo ${RELEASE} | grep -m1 -ioe 'https://[^\"]*')
|
DOWNLOAD=$(echo ${RELEASE} | grep -m1 -ioe 'https://[^\"]*')
|
||||||
CHECKSUM=$(echo ${RELEASE} | grep -ioe '\"checksum\"\:\"[^\"]*' | sed 's/\"checksum\"\:\"//')
|
CHECKSUM=$(echo ${RELEASE} | grep -ioe '\"checksum\"\:\"[^\"]*' | sed 's/\"checksum\"\:\"//')
|
||||||
|
|
||||||
if [ "$VERBOSE" = "yes" ]; then
|
verboseOutput RELEASE DOWNLOAD CHECKSUM
|
||||||
for i in RELEASE DOWNLOAD CHECKSUM; do
|
|
||||||
info "$i=${!i}"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${DOWNLOAD}" ]; then
|
if [ -z "${DOWNLOAD}" ]; then
|
||||||
if [ "$DISTRO" = "ubuntu" -a "$BUILD" = "linux-ubuntu-armv7l" ]; then
|
if [ "$DISTRO" = "ubuntu" -a "$BUILD" = "linux-ubuntu-armv7l" ]; then
|
||||||
|
@ -425,6 +421,7 @@ SKIP_DOWNLOAD="no"
|
||||||
|
|
||||||
INSTALLED_VERSION="$(getPlexVersion)" || warn "Unable to detect installed version, first time?"
|
INSTALLED_VERSION="$(getPlexVersion)" || warn "Unable to detect installed version, first time?"
|
||||||
FILE_VERSION="$(cut -f2 -d_ <<< "${FILENAME}")"
|
FILE_VERSION="$(cut -f2 -d_ <<< "${FILENAME}")"
|
||||||
|
verboseOutput INSTALLED_VERSION FILE_VERSION
|
||||||
|
|
||||||
if [ "${REDHAT}" = "yes" -a "${AUTOINSTALL}" = "yes" -a "${AUTOSTART}" = "no" ]; then
|
if [ "${REDHAT}" = "yes" -a "${AUTOINSTALL}" = "yes" -a "${AUTOSTART}" = "no" ]; then
|
||||||
warn "Your distribution may require the use of the AUTOSTART [-s] option for the service to start after the upgrade completes."
|
warn "Your distribution may require the use of the AUTOSTART [-s] option for the service to start after the upgrade completes."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue