From e917557f2a5404f69aad0fad623effe92db5ed88 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Thu, 20 Jun 2013 21:31:41 +0200 Subject: [PATCH] common.sh: prevent re-download if RIIVOLUTION_ZIP already exists --- script.d/common.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/script.d/common.sh b/script.d/common.sh index 9c964e4..da27c0d 100644 --- a/script.d/common.sh +++ b/script.d/common.sh @@ -75,8 +75,12 @@ check_input_image () { check_riivolution_patch () { if [[ ${DOWNLOAD} ]]; then - wget ${DOWNLOAD_LINK} -O ${RIIVOLUTION_ZIP} - unzip ${RIIVOLUTION_ZIP} >/dev/null + if [[ ! -f ${RIIVOLUTION_ZIP} ]]; then + wget ${DOWNLOAD_LINK} -O ${RIIVOLUTION_ZIP} + fi + if [[ ! -d "${RIIVOLUTION_DIR}" ]]; then + unzip ${RIIVOLUTION_ZIP} >/dev/null + fi elif [[ -f ${RIIVOLUTION_ZIP} && ! -d "${RIIVOLUTION_DIR}" ]]; then unzip ${RIIVOLUTION_ZIP} >/dev/null elif [[ ! -d "${RIIVOLUTION_DIR}" ]]; then