make it easier to add games where the installer has to be manually downloaded.

This commit is contained in:
Storm Dragon 2021-06-14 06:54:18 -04:00
parent 89e0ca5ab4
commit f854ffba45

View File

@ -282,6 +282,23 @@ download() {
done done
} }
get_installer() {
# If the file is in cache nothing else needs to be done.
if [[ -f "${cache}/$1" ]]; then
return
fi
read -p "Make sure $1 is available in either your Downloads or Desktop directory and press enter to continue." continue
# Search the Desktop and Downloads directories for the installation file
for i in ~/Downloads ~/Desktop ; do
find $i -type f -name "$1" -exec cp -v {} "${cache}/" \;
done
# If the file is still not available abort.
if [[ ! -f "${cache}/$1" ]]; then
echo "couldn't find $1. Please download the file and try again."
exit 1
fi
}
help() { help() {
echo "${0##*/}" echo "${0##*/}"
echo "Released under the terms of the Common Public Attribution License Version 1.0" echo "Released under the terms of the Common Public Attribution License Version 1.0"
@ -1300,14 +1317,7 @@ EOF
add_launcher "c:\Program Files\scrolling battles\SBYW.exe" add_launcher "c:\Program Files\scrolling battles\SBYW.exe"
;; ;;
"Sequence Storm") "Sequence Storm")
read -p "Make sure sequence-storm-win64.zip is available in either your Downloads or Desktop directory and press enter to continue." continue get_installer "sequence-storm-win64.zip"
for i in ~/Downloads ~/Desktop ; do
find $i -type f -name 'sequence-storm-win64.zip' -exec cp -v {} "${cache}/" \;
done
if [[ ! -f "${cache}/sequence-storm-win64.zip" ]]; then
echo "couldn't find sequence-storm-win64.zip. Please download the file and try again."
exit 1
fi
export WINEARCH=win64 export WINEARCH=win64
export winVer="win10" export winVer="win10"
install_wine_bottle install_wine_bottle