From 1780398e7cd4e798671abddb00ff38ee461bd3a4 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Wed, 3 Jul 2013 16:44:13 +0200 Subject: [PATCH] use unrar x, in favour of e, check if a download link exists, before trying to do --- script.d/common.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/script.d/common.sh b/script.d/common.sh index 8258894..b69788e 100644 --- a/script.d/common.sh +++ b/script.d/common.sh @@ -47,8 +47,9 @@ C AnotherSMB D Newer: Holiday Special E Cannon Super Mario Bros. F Epic Super Bowser World +G Koopa Country -G The Legend of Zelda: Parallel Worlds + 1 The Legend of Zelda: Parallel Worlds " read GAME @@ -112,11 +113,14 @@ check_input_image () { check_riivolution_patch () { if [[ ${DOWNLOAD} ]]; then - if [[ ! -f ${RIIVOLUTION_ZIP} ]]; then - wget ${DOWNLOAD_LINK} -O ${RIIVOLUTION_ZIP} - fi - if [[ ! -d "${RIIVOLUTION_DIR}" ]]; then - unzip ${RIIVOLUTION_ZIP} >/dev/null + if [[ ${DOWNLOAD_LINK} ]]; then + if [[ ! -f ${RIIVOLUTION_ZIP} ]]; then + wget ${DOWNLOAD_LINK} -O ${RIIVOLUTION_ZIP} + unzip ${RIIVOLUTION_ZIP} >/dev/null + fi + else + echo "no download link for ${GAMENAME} available." + exit 1 fi elif [[ -f ${RIIVOLUTION_ZIP} && ! -d "${RIIVOLUTION_DIR}" ]]; then unzip ${RIIVOLUTION_ZIP} >/dev/null @@ -181,7 +185,7 @@ while [[ $xcount -lt $pcount ]]; do if [[ "${PATCH}" == *.zip ]]; then unzip "${PATCH}" >/dev/null elif [[ "${PATCH}" == *.rar ]]; then - unrar e "${PATCH}" >/dev/null + unrar x "${PATCH}" >/dev/null fi else echo -e "PATCH patch ${PATCH} not found."