From b0f79365a966dc1a925bcb5ea018893a8cb6f6a6 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Tue, 23 Feb 2021 16:14:27 -0500 Subject: [PATCH 1/2] Noninteractive installation added with the -I flag. --- audiogame-manager.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index fa09638..e7e539c 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -279,6 +279,10 @@ install_wine_bottle() { export WINEARCH="${WINEARCH:-win32}" local bottle="${game,,}" bottle="${bottle//[[:space:]]/-}" + if [[ -d "$HOME/.local/wine/${bottle}" ]]; then + echo "$HOME/.local/wine/${bottle} exists. Please remove it before running this installer." + exit 1 + fi mkdir -p "$HOME/.local/wine/${bottle}" export WINEPREFIX="$HOME/.local/wine/${bottle}" # Arguments to the function are dependancies to be installed. @@ -613,6 +617,7 @@ declare -A command=( [d]="Debug mode, wine will be much more verbose when games are launched with this flag." [h]="This help screen." [i]="Install games." + [I:]="Noninteractive game installation." [k]="Kill a running game that is stuck." [L]="Display license information." [l:]="Launch given game without interactive audiogame-manager menu specified by its wine bottle." @@ -633,6 +638,9 @@ while getopts "${args}" i ; do ;; h) help;; i) game_installer;; + I) + game="${OPTARG}" + break;; k) kill_game;; L) license;; l) game_launcher "${OPTARG}";; @@ -1262,7 +1270,8 @@ EOF open_url "https://patreon.com/stormux" ;; *) - exit 0 + [[ -n "${game}" ]] && echo "Game \"${game}\" not found." + exit 1 ;; esac From 557c95c605c53a772863f8c395eae0ac0a2d797f Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Thu, 25 Feb 2021 16:09:18 -0500 Subject: [PATCH 2/2] Removed wine-gecko and wine-mono from the check list because audiogame-manager will now install them if they are not present. --- audiogame-manager.sh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index e7e539c..5cbc8b6 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -195,16 +195,6 @@ checklist() { else errorList+=("Warning: unix2dos is not installed. Some games need a configuration file in dos format before they will run.") fi - if [[ -d /usr/share/wine/gecko/ ]]; then - echo "Found wine gecko." - else - errorList+=("Warning: Wine gecko not found, some games may not work.") - fi - if [[ -d /usr/share/wine/mono/ ]]; then - echo "Found wine mono." - else - errorList+=("Warning: Wine mono not found, some games may not work.") - fi if command -v xclip &> /dev/null ; then echo "Xclip is installed." else