mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-14 18:47:16 -07:00
Check if wget fails due to unsupported options
--show-progress will not stop plexupdate.sh but it will tell you it didn't like it very much. You need wget 1.16+ for that to work. Fixes #123
This commit is contained in:
parent
7bc0039328
commit
cb30231fac
1 changed files with 7 additions and 0 deletions
|
@ -766,6 +766,13 @@ if [ "${SKIP_DOWNLOAD}" = "no" ]; then
|
|||
infoLogNoNewline "Downloading release \"${FILENAME}\"..."
|
||||
wget ${WGETOPTIONS} -o "${FILE_WGETLOG}" --load-cookies "${FILE_KAKA}" --save-cookies "${FILE_KAKA}" --keep-session-cookies "${DOWNLOAD}" -O "${DOWNLOADDIR}/${FILENAME}" 2>&1
|
||||
CODE=$?
|
||||
if [ ${CODE} -eq 2 ]; then
|
||||
errorLog "!! Your wget is too old to support --show-progress"
|
||||
infoLogNoNewline "Trying to download release \"${FILENAME}\" again..."
|
||||
wget -o "${FILE_WGETLOG}" --load-cookies "${FILE_KAKA}" --save-cookies "${FILE_KAKA}" --keep-session-cookies "${DOWNLOAD}" -O "${DOWNLOADDIR}/${FILENAME}" 2>&1
|
||||
CODE=$?
|
||||
fi
|
||||
|
||||
ERROR=$(cat ${FILE_WGETLOG})
|
||||
if [ ${CODE} -ne 0 ]; then
|
||||
errorLog "!! Download failed with code ${CODE}, \"${ERROR}\""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue