Noninteractive installation added with the -I flag.
This commit is contained in:
parent
b7c34a2dbe
commit
b0f79365a9
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user