From f298134185bed0ca1faf4e576d7d73883bdd03b1 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Sat, 6 Jul 2013 08:52:20 +0200 Subject: [PATCH] properly handle .rar files --- 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 b713ccb..a5d51a1 100644 --- a/script.d/common.sh +++ b/script.d/common.sh @@ -111,7 +111,11 @@ check_riivolution_patch () { if [[ ${DOWNLOAD_LINK} ]]; then if [[ ! -f ${RIIVOLUTION_ZIP} ]]; then wget ${DOWNLOAD_LINK} -O ${RIIVOLUTION_ZIP} - unzip ${RIIVOLUTION_ZIP} >/dev/null + if [[ ${RIIVOLUTION_ZIP} == *.zip ]]; then + unzip ${RIIVOLUTION_ZIP} >/dev/null + elif [[ ${RIIVOLUTION_ZIP} == *.rar ]]; then + unrar x ${RIIVOLUTION_ZIP} >/dev/null + fi fi else echo "no download link for ${GAMENAME} available." @@ -166,7 +170,7 @@ while [[ $xcount -lt $pcount ]]; do if [[ "${RIIVOLUTION}" == *.zip ]]; then unzip "${RIIVOLUTION}" >/dev/null elif [[ "${RIIVOLUTION}" == *.rar ]]; then - unrar e "${RIIVOLUTION}" >/dev/null + unrar x "${RIIVOLUTION}" >/dev/null fi else echo -e "Riivolution patch ${RIIVOLUTION} not found."