A little more progress on refactor.
This commit is contained in:
@ -267,7 +267,7 @@ custom_launch_parameters() {
|
||||
}
|
||||
|
||||
# Process game launcher flags
|
||||
process_launcher-flags() {
|
||||
process_launcher_flags() {
|
||||
flags=("${game[@]:3}")
|
||||
for i in "${flags[@]}" ; do
|
||||
if [[ "${i}" =~ ^export\ [a-zA-Z_][a-zA-Z0-9_]*=\'?.*\'?$ ]]; then
|
||||
@ -375,7 +375,7 @@ game_launcher() {
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
process_launcher-flags
|
||||
process_launcher_flags
|
||||
custom_launch_parameters
|
||||
${wine:-/usr/bin/wine} start /d "${game[1]%\\*}" "${game[1]##*\\}" /realtime
|
||||
fi
|
||||
@ -486,7 +486,7 @@ while getopts "${args}" i ; do
|
||||
h) help;;
|
||||
i) game_installer;;
|
||||
I)
|
||||
game="${OPTARG}"
|
||||
export game="${OPTARG}"
|
||||
break;;
|
||||
k) kill_game;;
|
||||
L) license;;
|
||||
@ -501,7 +501,7 @@ while getopts "${args}" i ; do
|
||||
r) game_removal;;
|
||||
S) defaultRate="${OPTARG}";;
|
||||
t)
|
||||
gameCount=$(find .install -type f -iname "*.sh" | wc -l)
|
||||
gameCount=$(find ".install" -type f -iname "*.sh" | wc -l)
|
||||
dialog --backtitle "Linux Game Manager" \
|
||||
--infobox "There are currently ${gameCount} games available." -1 -1
|
||||
exit 0
|
||||
@ -511,7 +511,17 @@ while getopts "${args}" i ; do
|
||||
esac
|
||||
done
|
||||
|
||||
# If agmNoLaunch is set, exit (script is being sourced)
|
||||
[[ "$agmNoLaunch" == "true" ]] && exit 0
|
||||
|
||||
# If no game specified, exit
|
||||
[[ ${#game} -lt 1 ]] && exit 0
|
||||
|
||||
|
||||
[[ "$agmNoLaunch" != "true" ]] && exit 0
|
||||
# Install the specified game noninteractively
|
||||
if [[ -f ".install/${game}.sh" ]]; then
|
||||
export LANG="en_US.UTF-8"
|
||||
. ".install/${game}.sh"
|
||||
else
|
||||
echo "Error: Game '${game}' not found in .install directory"
|
||||
exit 1
|
||||
fi
|
||||
|
Reference in New Issue
Block a user