mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-14 02:26:56 -07:00
Install if already downloaded
This commit is contained in:
parent
856f9833bf
commit
126a4574b9
1 changed files with 16 additions and 9 deletions
|
@ -217,19 +217,26 @@ if [ $? -ne 0 ]; then
|
|||
exit 3
|
||||
fi
|
||||
|
||||
SKIPDOWNLOAD="no"
|
||||
if [ -f "${DOWNLOADDIR}/${FILENAME}" -a "${FORCE}" != "yes" ]; then
|
||||
echo "File already exists, won't download."
|
||||
exit 2
|
||||
if [ "${AUTOINSTALL}" != "yes" ]; then
|
||||
echo "File already exists, won't download."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
SKIP_DOWNLOAD="yes"
|
||||
fi
|
||||
|
||||
echo -ne "Downloading release \"${FILENAME}\"..."
|
||||
ERROR=$(wget --load-cookies /tmp/kaka --save-cookies /tmp/kaka --keep-session-cookies "${DOWNLOAD}" -O "${DOWNLOADDIR}/${FILENAME}" 2>&1)
|
||||
CODE=$?
|
||||
if [ ${CODE} -ne 0 ]; then
|
||||
echo -e "\n !! Download failed with code ${CODE}, \"${ERROR}\""
|
||||
exit ${CODE}
|
||||
if [ "${SKIP_DOWNLOAD}" == "no" ]; then
|
||||
echo -ne "Downloading release \"${FILENAME}\"..."
|
||||
ERROR=$(wget --load-cookies /tmp/kaka --save-cookies /tmp/kaka --keep-session-cookies "${DOWNLOAD}" -O "${DOWNLOADDIR}/${FILENAME}" 2>&1)
|
||||
CODE=$?
|
||||
if [ ${CODE} -ne 0 ]; then
|
||||
echo -e "\n !! Download failed with code ${CODE}, \"${ERROR}\""
|
||||
exit ${CODE}
|
||||
fi
|
||||
echo "OK"
|
||||
fi
|
||||
echo "OK"
|
||||
|
||||
if [ "${AUTOINSTALL}" == "yes" ]; then
|
||||
if [ "${REDHAT}" == "yes" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue