diff --git a/d2-setup.sh b/d2-setup.sh index b3c4e35..db6e673 100755 --- a/d2-setup.sh +++ b/d2-setup.sh @@ -24,7 +24,7 @@ installD2(){ exit 0; fi - cd ${D2_INSTALLER_PATH} + cd "${D2_INSTALLER_PATH}" || exit 1 WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" wine Installer.exe @@ -40,7 +40,7 @@ installLOD(){ exit 0; fi - cd ${LOD_INSTALLER_PATH} + cd "${LOD_INSTALLER_PATH}" || exit 1 WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" wine Installer.exe } @@ -69,20 +69,20 @@ getTricks(){ getGlide(){ if [ ! -f /tmp/gl32ogl14e.zip ];then - cd /tmp + cd /tmp || exit 1 wget http://www.svenswrapper.de/gl32ogl14e.zip unzip gl32ogl14e.zip echo -e "\nCopying Files to Diablo game directory...\n" - cp -v {glide-init.exe,glide3x.dll} ${PREFIX}/drive_c/"Program Files"/"Diablo II"/ + cp -v {glide-init.exe,glide3x.dll} "${PREFIX}/drive_c/Program Files/Diablo II/" echo -e "\nCleaning up temp files...\n" rm {glide-readme.txt,glide-liesmich.txt,glide-init.exe,glide3x.dll,gl32ogl14e.zip} - cd ${PREFIX}/drive_c/"Program Files"/"Diablo II"/ + cd "${PREFIX}/drive_c/"Program Files"/"Diablo II"/" || exit 1 WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" wine glide-init.exe @@ -91,7 +91,7 @@ getGlide(){ } runGame(){ - cd ${PREFIX}/drive_c/"Program Files"/"Diablo II"/ + cd "${PREFIX}/drive_c/"Program Files"/"Diablo II"/" || exit 1 echo -n -e "\nRun game now?(Y/n): " @@ -109,7 +109,7 @@ runGame(){ run_glide(){ - cd ${PREFIX}/drive_c/"Program Files"/"Diablo II"/ + cd "${PREFIX}/drive_c/"Program Files"/"Diablo II"/" || exit 1 WINEPREFIX="${PREFIX}" WINEARCH="${ARCH}" wine "glide-init.exe"