Standardize tabs

This commit is contained in:
Jon Shaulis 2016-09-06 00:19:47 -04:00
commit c34022760f

View file

@ -31,8 +31,8 @@
#################################################################### ####################################################################
# Quick-check before we allow bad things to happen # Quick-check before we allow bad things to happen
if [ -z "${BASH_VERSINFO}" ]; then if [ -z "${BASH_VERSINFO}" ]; then
echo "ERROR: You must execute this script with BASH" >&2 echo "ERROR: You must execute this script with BASH" >&2
exit 255 exit 255
fi fi
#################################################################### ####################################################################
# Set these three settings to what you need, or create a .plexupdate file # Set these three settings to what you need, or create a .plexupdate file
@ -384,7 +384,7 @@ if [ -f /tmp/kaka_token ]; then
fi fi
if [ "${PUBLIC}" = "no" ]; then if [ "${PUBLIC}" = "no" ]; then
echo -n "Authenticating..." echo -n "Authenticating..."
# Clean old session # Clean old session
rm /tmp/kaka 2>/dev/null rm /tmp/kaka 2>/dev/null
@ -417,7 +417,8 @@ if [ "${PUBLIC}" = "no" ]; then
# Remove this, since it contains more information than we should leave hanging around # Remove this, since it contains more information than we should leave hanging around
rm /tmp/failcause rm /tmp/failcause
echo "OK" echo "OK"
elif [ "$PUBLIC" != "no" ]; then elif [ "$PUBLIC" != "no" ]; then
# It's a public version, so change URL and make doubly sure that cookies are empty # It's a public version, so change URL and make doubly sure that cookies are empty
rm 2>/dev/null >/dev/null /tmp/kaka rm 2>/dev/null >/dev/null /tmp/kaka
@ -451,7 +452,7 @@ if [ "${LISTOPTS}" = "yes" ]; then
fi fi
# Extract the URL for our release # Extract the URL for our release
echo -n "Finding download URL to download..." echo -n "Finding download URL to download..."
# 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 # 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 /tmp/kaka --save-cookies /tmp/kaka --keep-session-cookies "${URL_DOWNLOAD}" -O - 2>/dev/null | grep -ioe '"label"[^}]*' | grep -i "\"distro\":\"${DISTRO}\"" | grep -m1 -i "\"build\":\"${BUILD}\"") RELEASE=$(wget --header "X-Plex-Token:"${TOKEN}"" --load-cookies /tmp/kaka --save-cookies /tmp/kaka --keep-session-cookies "${URL_DOWNLOAD}" -O - 2>/dev/null | grep -ioe '"label"[^}]*' | grep -i "\"distro\":\"${DISTRO}\"" | grep -m1 -i "\"build\":\"${BUILD}\"")
@ -473,12 +474,12 @@ fi
echo "${CHECKSUM} ${DOWNLOADDIR}/${FILENAME}" >"${DOWNLOADDIR}/${FILENAME}.sha" echo "${CHECKSUM} ${DOWNLOADDIR}/${FILENAME}" >"${DOWNLOADDIR}/${FILENAME}.sha"
if [ "${PRINT_URL}" = "yes" ]; then if [ "${PRINT_URL}" = "yes" ]; then
if [ "${QUIET}" = "yes" ]; then if [ "${QUIET}" = "yes" ]; then
echo "${DOWNLOAD}" >&3 echo "${DOWNLOAD}" >&3
else else
echo "${DOWNLOAD}" echo "${DOWNLOAD}"
fi fi
cronexit 0 cronexit 0
fi fi
# By default, try downloading # By default, try downloading
@ -495,8 +496,8 @@ else
fi fi
if [[ $FILENAME == *$INSTALLED_VERSION* ]] && [ "${FORCE}" != "yes" -a "${FORCEALL}" != "yes" ] && [ ! -z "${INSTALLED_VERSION}" ]; then if [[ $FILENAME == *$INSTALLED_VERSION* ]] && [ "${FORCE}" != "yes" -a "${FORCEALL}" != "yes" ] && [ ! -z "${INSTALLED_VERSION}" ]; then
echo "Your OS reports the latest version of Plex ($INSTALLED_VERSION) is already installed. Use -f to force download." echo "Your OS reports the latest version of Plex ($INSTALLED_VERSION) is already installed. Use -f to force download."
cronexit 5 cronexit 5
fi fi
if [ -f "${DOWNLOADDIR}/${FILENAME}" ]; then if [ -f "${DOWNLOADDIR}/${FILENAME}" ]; then