Updated the removal for The Omega Reach so it actually works now.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user