mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-07-16 02:02:58 -07:00
Merge pull request #103 from mscreations/fix-checksum
Fix issue with missed checksum check
This commit is contained in:
commit
d24061ec83
1 changed files with 10 additions and 4 deletions
|
@ -501,11 +501,17 @@ 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
|
||||||
|
sha1sum --status -c "${DOWNLOADDIR}/${FILENAME}.sha"
|
||||||
|
if [ $? -eq 0 ]; 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"
|
||||||
|
else
|
||||||
|
echo "File exists but fails checksum. Redownloading."
|
||||||
|
SKIP_DOWNLOAD="no"
|
||||||
|
fi
|
||||||
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue