properly handle .rar files

This commit is contained in:
Christopher Roy Bratusek 2013-07-06 08:52:20 +02:00
parent f8f0d51c42
commit f298134185

View File

@ -111,7 +111,11 @@ check_riivolution_patch () {
if [[ ${DOWNLOAD_LINK} ]]; then if [[ ${DOWNLOAD_LINK} ]]; then
if [[ ! -f ${RIIVOLUTION_ZIP} ]]; then if [[ ! -f ${RIIVOLUTION_ZIP} ]]; then
wget ${DOWNLOAD_LINK} -O ${RIIVOLUTION_ZIP} wget ${DOWNLOAD_LINK} -O ${RIIVOLUTION_ZIP}
if [[ ${RIIVOLUTION_ZIP} == *.zip ]]; then
unzip ${RIIVOLUTION_ZIP} >/dev/null unzip ${RIIVOLUTION_ZIP} >/dev/null
elif [[ ${RIIVOLUTION_ZIP} == *.rar ]]; then
unrar x ${RIIVOLUTION_ZIP} >/dev/null
fi
fi fi
else else
echo "no download link for ${GAMENAME} available." echo "no download link for ${GAMENAME} available."
@ -166,7 +170,7 @@ while [[ $xcount -lt $pcount ]]; do
if [[ "${RIIVOLUTION}" == *.zip ]]; then if [[ "${RIIVOLUTION}" == *.zip ]]; then
unzip "${RIIVOLUTION}" >/dev/null unzip "${RIIVOLUTION}" >/dev/null
elif [[ "${RIIVOLUTION}" == *.rar ]]; then elif [[ "${RIIVOLUTION}" == *.rar ]]; then
unrar e "${RIIVOLUTION}" >/dev/null unrar x "${RIIVOLUTION}" >/dev/null
fi fi
else else
echo -e "Riivolution patch ${RIIVOLUTION} not found." echo -e "Riivolution patch ${RIIVOLUTION} not found."