Convert spaces to tabs

This commit is contained in:
Jon Shaulis 2016-08-27 13:02:08 -04:00
commit 409f8992dc

View file

@ -478,26 +478,26 @@ if [[ $FILENAME == *$INSTALLED_VERSION* ]] && [ "${FORCE}" != "yes" -a "${FORCEA
fi fi
if [ -f "${DOWNLOADDIR}/${FILENAME}" ]; then if [ -f "${DOWNLOADDIR}/${FILENAME}" ]; then
if [ "${FORCE}" != "yes" -a "${FORCEALL}" != "yes" ]; then if [ "${FORCE}" != "yes" -a "${FORCEALL}" != "yes" ]; then
echo "File already exists (${FILENAME}), won't download." echo "File already exists (${FILENAME}), won't download."
if [ "${AUTOINSTALL}" != "yes" ]; then if [ "${AUTOINSTALL}" != "yes" ]; then
cronexit 2 cronexit 2
fi fi
SKIP_DOWNLOAD="yes" SKIP_DOWNLOAD="yes"
elif [ "${FORCEALL}" == "yes" ]; then elif [ "${FORCEALL}" == "yes" ]; then
echo "Note! File exists, but asked to overwrite with new copy" echo "Note! File exists, but asked to overwrite with new copy"
else else
sha1sum --status -c "${DOWNLOADDIR}/${FILENAME}.sha" sha1sum --status -c "${DOWNLOADDIR}/${FILENAME}.sha"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Note! File exists but fails checksum. Redownloading." echo "Note! File exists but fails checksum. Redownloading."
else else
echo "File exists and checksum passes, won't redownload." echo "File exists and checksum passes, won't redownload."
if [ "${AUTOINSTALL}" != "yes" ]; then if [ "${AUTOINSTALL}" != "yes" ]; then
cronexit 2 cronexit 2
fi fi
SKIP_DOWNLOAD="yes" SKIP_DOWNLOAD="yes"
fi fi
fi fi
fi fi
if [ "${SKIP_DOWNLOAD}" = "no" ]; then if [ "${SKIP_DOWNLOAD}" = "no" ]; then
@ -505,16 +505,16 @@ if [ "${SKIP_DOWNLOAD}" = "no" ]; then
ERROR=$(wget --load-cookies /tmp/kaka --save-cookies /tmp/kaka --keep-session-cookies "${DOWNLOAD}" -O "${DOWNLOADDIR}/${FILENAME}" 2>&1) ERROR=$(wget --load-cookies /tmp/kaka --save-cookies /tmp/kaka --keep-session-cookies "${DOWNLOAD}" -O "${DOWNLOADDIR}/${FILENAME}" 2>&1)
CODE=$? CODE=$?
if [ ${CODE} -ne 0 ]; then if [ ${CODE} -ne 0 ]; then
echo -e "\n !! Download failed with code ${CODE}, \"${ERROR}\"" echo -e "\n !! Download failed with code ${CODE}, \"${ERROR}\""
cronexit ${CODE} cronexit ${CODE}
fi fi
echo "OK" echo "OK"
fi fi
sha1sum --status -c "${DOWNLOADDIR}/${FILENAME}.sha" sha1sum --status -c "${DOWNLOADDIR}/${FILENAME}.sha"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Downloaded file corrupt. Try again." echo "Downloaded file corrupt. Try again."
cronexit 4 cronexit 4
fi fi
if [ ! -z "${PLEXSERVER}" -a "${AUTOINSTALL}" = "yes" ]; then if [ ! -z "${PLEXSERVER}" -a "${AUTOINSTALL}" = "yes" ]; then
@ -532,8 +532,8 @@ fi
if [ "${AUTODELETE}" = "yes" ]; then if [ "${AUTODELETE}" = "yes" ]; then
if [ "${AUTOINSTALL}" = "yes" ]; then if [ "${AUTOINSTALL}" = "yes" ]; then
rm -rf "${DOWNLOADDIR}/${FILENAME}" rm -rf "${DOWNLOADDIR}/${FILENAME}"
# Also delete the SHA1 file # Also delete the SHA1 file
rm -rf "${DOWNLOADDIR}/${FILENAME}.sha" rm -rf "${DOWNLOADDIR}/${FILENAME}.sha"
echo "Deleted \"${FILENAME}\"" echo "Deleted \"${FILENAME}\""
else else
echo "Will not auto delete without [-a] auto install" echo "Will not auto delete without [-a] auto install"