From 7470576cd6d0dc22eb3f1a04afe8f10b7e380836 Mon Sep 17 00:00:00 2001 From: Alex Malinovich Date: Tue, 16 Aug 2016 12:12:56 -0700 Subject: [PATCH] Standardize on all uppercase variables --- plexupdate.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plexupdate.sh b/plexupdate.sh index 77c0e1a..41c2245 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -125,7 +125,7 @@ URL_DOWNLOAD_PUBLIC=https://plex.tv/api/downloads/1.json cronexit() { # Don't give anything but true error codes if in CRON mode - rawexit=$1 + RAWEXIT=$1 if [ "${CRON}" = "yes" -a $1 -gt 1 -a $1 -lt 255 ]; then exit 0 fi @@ -206,8 +206,8 @@ fi if [ "${CRON}" = "yes" -a "${QUIET}" = "no" ]; then # If running in cron mode, redirect STDOUT to temporary file - stdoutlog="$(mktemp)" - exec 3>&1 >"${stdoutlog}" + STDOUTLOG="$(mktemp)" + exec 3>&1 >"${STDOUTLOG}" elif [ "${QUIET}" = "yes" ]; then # Redirect STDOUT to dev null. Use >&3 if you really, really, REALLY need to print to STDOUT exec 3>&1 > /dev/null @@ -331,11 +331,11 @@ keypair() { # Setup an cronexit handler so we cleanup function cleanup { - if [ "${CRON}" = yes -a "${rawexit}" -ne 5 -a -f "${stdoutlog}" ]; then + if [ "${CRON}" = yes -a "${RAWEXIT}" -ne 5 -a -f "${STDOUTLOG}" ]; then exec 1>&3 - cat "${stdoutlog}" + cat "${STDOUTLOG}" fi - rm "${stdoutlog}" 2>/dev/null >/dev/null + rm "${STDOUTLOG}" 2>/dev/null >/dev/null rm /tmp/postdata 2>/dev/null >/dev/null rm /tmp/raw 2>/dev/null >/dev/null rm /tmp/failcause 2>/dev/null >/dev/null