diff --git a/home/stormux/.local/.functions/game_install_functions.sh b/home/stormux/.local/.functions/game_install_functions.sh index 40ef674..50d297e 100755 --- a/home/stormux/.local/.functions/game_install_functions.sh +++ b/home/stormux/.local/.functions/game_install_functions.sh @@ -111,7 +111,9 @@ check_dependencies() { } open_url() { - GAME="$*" startx + local targetUrl="$1" + + env GAME="$targetUrl" startx } wait_for_enter() { @@ -147,11 +149,15 @@ get_installer() { fi if [[ -n "$downloadUrl" ]]; then - instructions="Opening game download page, press enter to continue. -When the download finishes, please close your browser window to continue. You can do this by pressing control+w." + instructions="Opening game download page. +When the download finishes, please close your browser window to continue. You can do this by pressing control+w. +Press enter to continue." speak "$instructions" 1 wait_for_enter "Press enter to continue." - open_url "$downloadUrl" + if ! open_url "$downloadUrl"; then + ui_msgbox "Game Installer" "Game Installer" "Could not open the browser for ${installerName}. Check the install log for details." + exit 1 + fi if collect_installer_file "$installerName"; then return 0