From 12024f75812d5f6546948e50a023557e31629861 Mon Sep 17 00:00:00 2001 From: Henric Andersson Date: Wed, 16 Nov 2016 22:08:54 -0800 Subject: [PATCH] Fixed various minor issues and spelling --- plexupdate.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/plexupdate.sh b/plexupdate.sh index e0a1abf..4fd2c78 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -77,8 +77,8 @@ URL_DOWNLOAD='https://plex.tv/api/downloads/1.json?channel=plexpass' URL_DOWNLOAD_PUBLIC='https://plex.tv/api/downloads/1.json' FILE_POSTDATA=$(mktemp /tmp/plexupdate.postdata.XXXX) -FILE_RAW=$(mktemp /tmp/plexupdate.failcause.XXXX) -FILE_FAILCAUSE=$(mktemp /tmp/plexupdate.raw.XXXX) +FILE_RAW=$(mktemp /tmp/plexupdate.raw.XXXX) +FILE_FAILCAUSE=$(mktemp /tmp/plexupdate.failcause.XXXX) FILE_KAKA=$(mktemp /tmp/plexupdate.kaka.XXXX) FILE_SHA=$(mktemp /tmp/plexupdate.sha.XXXX) FILE_WGETLOG=$(mktemp /tmp/plexupdate.wget.XXXX) @@ -419,7 +419,7 @@ if [ "${AUTOUPDATE}" = "yes" ]; then fi # Sanity check -if [ -z "${EMAIL}" -o -z "${PASS}" ] && [ "${PUBLIC}" = "no" ] && [ ! -f "${FILE_KAKA}" ]; then +if [ -z "${EMAIL}" -o -z "${PASS}" ] && [ "${PUBLIC}" = "no" ]; then error "Need username & password to download PlexPass version. Otherwise run with -p to download public version." exit 1 fi @@ -427,7 +427,7 @@ fi if [ "${AUTOINSTALL}" = "yes" -o "${AUTOSTART}" = "yes" ]; then id | grep -i 'uid=0(' 2>&1 >/dev/null if [ $? -ne 0 ]; then - error "You need to be root to use autoinstall/autostart option." + error "You need to be root to use AUTOINSTALL/AUTOSTART option." exit 1 fi fi @@ -517,8 +517,6 @@ if [ "${PUBLIC}" = "no" ]; then # Provide some details to the end user RESULTCODE=$(head -n1 "${FILE_RAW}" | grep -oe '[1-5][0-9][0-9]') - info "Contents of ${FILE_RAW}" - cat "${FILE_RAW}" if [ $RESULTCODE -eq 401 ]; then error "Username and/or password incorrect" exit 1 @@ -564,7 +562,7 @@ if [ "${LISTOPTS}" = "yes" ]; then fi # Extract the URL for our release -info "Retriving list of available downloads" +info "Retrieving list of available distributions" # Set "X-Plex-Token" to the auth token, if no token is specified or it is invalid, the list will return public downloads by default RELEASE=$(wget --header "X-Plex-Token:"${TOKEN}"" --load-cookies "${FILE_KAKA}" --save-cookies "${FILE_KAKA}" --keep-session-cookies "${URL_DOWNLOAD}" -O - 2>/dev/null | grep -ioe '"label"[^}]*' | grep -i "\"distro\":\"${DISTRO}\"" | grep -m1 -i "\"build\":\"${BUILD}\"")