From 10f41e0e2c6e09e0816feb3c20e75a7a04e6a0ca Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Sat, 6 Jul 2013 18:49:35 +0200 Subject: [PATCH] fix handling riivolution zips with spaces in name --- script.d/common.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/script.d/common.sh b/script.d/common.sh index dbf5b72..99103ff 100644 --- a/script.d/common.sh +++ b/script.d/common.sh @@ -107,20 +107,20 @@ check_riivolution_patch () { if [[ ${DOWNLOAD} ]]; then if [[ ${DOWNLOAD_LINK} ]]; then - if [[ ! -f ${RIIVOLUTION_ZIP} ]]; then - wget ${DOWNLOAD_LINK} -O ${RIIVOLUTION_ZIP} - if [[ ${RIIVOLUTION_ZIP} == *.zip ]]; then - unzip ${RIIVOLUTION_ZIP} >/dev/null - elif [[ ${RIIVOLUTION_ZIP} == *.rar ]]; then - unrar x ${RIIVOLUTION_ZIP} >/dev/null + if [[ ! -f "${RIIVOLUTION_ZIP}" ]]; then + wget ${DOWNLOAD_LINK} -O "${RIIVOLUTION_ZIP}" + 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." exit 1 fi - elif [[ -f ${RIIVOLUTION_ZIP} && ! -d "${RIIVOLUTION_DIR}" ]]; then - unzip ${RIIVOLUTION_ZIP} >/dev/null + elif [[ -f "${RIIVOLUTION_ZIP}" && ! -d "${RIIVOLUTION_DIR}" ]]; then + unzip "${RIIVOLUTION_ZIP}" >/dev/null elif [[ ! -d "${RIIVOLUTION_DIR}" ]]; then echo -e "please specify zip to use with --riivolution=" exit 1