Transitional changes for FreeDoom, probably more to come.

This commit is contained in:
Storm Dragon 2024-12-26 13:22:39 -05:00
parent c8ec64ec52
commit 9e708f0bfa
3 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
launch_game() { launch_game() {
pushd "${doomPath}" pushd "${gamePath}"
#echo "exec stdbuf -oL ${gzdoom} ${@} | speak" #echo "exec stdbuf -oL ${gzdoom} ${@} | speak"
exec stdbuf -oL ${gzdoom} ${@} | speak exec stdbuf -oL ${gzdoom} ${@} | speak
popd popd
@ -340,7 +340,7 @@ case ${buttonCode} in
'-extratic' '-dup' '3' '-extratic' '-dup' '3'
) )
fi fi
pushd "${doomPath}" pushd "${gamePath}"
launch_game ${gameOption} "${flags[@]}" launch_game ${gameOption} "${flags[@]}"
;; ;;
0) 0)

View File

@ -430,12 +430,12 @@ game_removal() {
gameInstallPath="$(grep -F "installPath" "$gameFile" | grep -v 'pushd' | head -n1)" gameInstallPath="$(grep -F "installPath" "$gameFile" | grep -v 'pushd' | head -n1)"
gameInstallPath="${gameInstallPath#*/}" gameInstallPath="${gameInstallPath#*/}"
gameInstallPath="${installPath}/${gameInstallPath%/*}" gameInstallPath="${installPath}/${gameInstallPath%/*}"
if [[ -z "$gameInstallPath" ]] || [[ "${gameInstallPath}" == "$installPath" ]]; then if [[ -z "$gameInstallPath" ]] || [[ "${gameInstallPath%%/}" == "$installPath" ]]; then
# No install path found, just remove from list # No install path found, just remove from list
dialog --backtitle "Linux Game Manager" \ dialog --backtitle "Linux Game Manager" \
--yesno "This will remove the game from your game list, but will not remove any files. Do you want to continue?" -1 -1 || exit 0 --yesno "This will remove the game from your game list, but will not remove any files. Do you want to continue?" -1 -1 || exit 0
# Remove only the .sh symlink # Remove only the .sh symlink
rm -f "${0%/*}/.launch/${gameName}.sh" | \ rm -fv "${0%/*}/.launch/${gameName}.sh" | \
dialog --backtitle "Linux Game Manager" \ dialog --backtitle "Linux Game Manager" \
--progressbox "Removing game from list..." -1 -1 --progressbox "Removing game from list..." -1 -1
else else