mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-19 04:49:34 -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
|
exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
SKIPDOWNLOAD="no"
|
||||||
if [ -f "${DOWNLOADDIR}/${FILENAME}" -a "${FORCE}" != "yes" ]; then
|
if [ -f "${DOWNLOADDIR}/${FILENAME}" -a "${FORCE}" != "yes" ]; then
|
||||||
echo "File already exists, won't download."
|
if [ "${AUTOINSTALL}" != "yes" ]; then
|
||||||
exit 2
|
echo "File already exists, won't download."
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
SKIP_DOWNLOAD="yes"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -ne "Downloading release \"${FILENAME}\"..."
|
if [ "${SKIP_DOWNLOAD}" == "no" ]; then
|
||||||
ERROR=$(wget --load-cookies /tmp/kaka --save-cookies /tmp/kaka --keep-session-cookies "${DOWNLOAD}" -O "${DOWNLOADDIR}/${FILENAME}" 2>&1)
|
echo -ne "Downloading release \"${FILENAME}\"..."
|
||||||
CODE=$?
|
ERROR=$(wget --load-cookies /tmp/kaka --save-cookies /tmp/kaka --keep-session-cookies "${DOWNLOAD}" -O "${DOWNLOADDIR}/${FILENAME}" 2>&1)
|
||||||
if [ ${CODE} -ne 0 ]; then
|
CODE=$?
|
||||||
echo -e "\n !! Download failed with code ${CODE}, \"${ERROR}\""
|
if [ ${CODE} -ne 0 ]; then
|
||||||
exit ${CODE}
|
echo -e "\n !! Download failed with code ${CODE}, \"${ERROR}\""
|
||||||
|
exit ${CODE}
|
||||||
|
fi
|
||||||
|
echo "OK"
|
||||||
fi
|
fi
|
||||||
echo "OK"
|
|
||||||
|
|
||||||
if [ "${AUTOINSTALL}" == "yes" ]; then
|
if [ "${AUTOINSTALL}" == "yes" ]; then
|
||||||
if [ "${REDHAT}" == "yes" ]; then
|
if [ "${REDHAT}" == "yes" ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue