Merge pull request #5 from diedthreetimes/master

Install if already downloaded
This commit is contained in:
Henric Andersson 2015-01-28 14:25:45 -08:00
commit 6f87183a71

View file

@ -217,11 +217,17 @@ if [ $? -ne 0 ]; then
exit 3
fi
SKIPDOWNLOAD="no"
if [ -f "${DOWNLOADDIR}/${FILENAME}" -a "${FORCE}" != "yes" ]; then
if [ "${AUTOINSTALL}" != "yes" ]; then
echo "File already exists, won't download."
exit 2
fi
SKIP_DOWNLOAD="yes"
fi
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=$?
@ -230,6 +236,7 @@ if [ ${CODE} -ne 0 ]; then
exit ${CODE}
fi
echo "OK"
fi
if [ "${AUTOINSTALL}" == "yes" ]; then
if [ "${REDHAT}" == "yes" ]; then