Standardize on all uppercase variables

This commit is contained in:
Alex Malinovich 2016-08-16 12:12:56 -07:00
commit 7470576cd6

View file

@ -125,7 +125,7 @@ URL_DOWNLOAD_PUBLIC=https://plex.tv/api/downloads/1.json
cronexit() { cronexit() {
# Don't give anything but true error codes if in CRON mode # 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 if [ "${CRON}" = "yes" -a $1 -gt 1 -a $1 -lt 255 ]; then
exit 0 exit 0
fi fi
@ -206,8 +206,8 @@ fi
if [ "${CRON}" = "yes" -a "${QUIET}" = "no" ]; then if [ "${CRON}" = "yes" -a "${QUIET}" = "no" ]; then
# If running in cron mode, redirect STDOUT to temporary file # If running in cron mode, redirect STDOUT to temporary file
stdoutlog="$(mktemp)" STDOUTLOG="$(mktemp)"
exec 3>&1 >"${stdoutlog}" exec 3>&1 >"${STDOUTLOG}"
elif [ "${QUIET}" = "yes" ]; then elif [ "${QUIET}" = "yes" ]; then
# Redirect STDOUT to dev null. Use >&3 if you really, really, REALLY need to print to STDOUT # Redirect STDOUT to dev null. Use >&3 if you really, really, REALLY need to print to STDOUT
exec 3>&1 > /dev/null exec 3>&1 > /dev/null
@ -331,11 +331,11 @@ keypair() {
# Setup an cronexit handler so we cleanup # Setup an cronexit handler so we cleanup
function 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 exec 1>&3
cat "${stdoutlog}" cat "${STDOUTLOG}"
fi 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/postdata 2>/dev/null >/dev/null
rm /tmp/raw 2>/dev/null >/dev/null rm /tmp/raw 2>/dev/null >/dev/null
rm /tmp/failcause 2>/dev/null >/dev/null rm /tmp/failcause 2>/dev/null >/dev/null