Updated the removal for The Omega Reach so it actually works now.

This commit is contained in:
Storm Dragon
2026-04-18 20:16:42 -04:00
parent 362feb044f
commit b617aa6ea6
3 changed files with 11 additions and 7 deletions

View File

@@ -790,9 +790,14 @@ game_removal() {
gameFile="$(readlink -f "${scriptRoot}/.launch/${gameName}.sh")"
# Get the actual installation path from the .game file
local gameInstallPath
gameInstallPath="$(grep -F "installPath" "$gameFile" | grep -v 'pushd' | head -n1)"
gameInstallPath="${gameInstallPath#*/}"
gameInstallPath="${installPath}/${gameInstallPath%/*}"
while IFS= read -r line; do
[[ "${line}" == \#* ]] && continue
[[ "${line}" == *'pushd'* ]] && continue
if [[ "${line}" =~ \$\{installPath\}/([^\"]+) ]]; then
gameInstallPath="${installPath}/${BASH_REMATCH[1]}"
break
fi
done < "${gameFile}"
if [[ -z "$gameInstallPath" ]] || [[ "${gameInstallPath%%/}" == "$installPath" ]]; then
# No install path found, just remove from list
ui_yesno "Linux Game Manager" "Linux Game Manager" "This will remove the game from your game list, but will not remove any files. Do you want to continue?" || exit 0