From a610b1545b7dae91be5feada42953f4a42a03e6b Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sun, 5 Feb 2023 03:41:58 +0300 Subject: [PATCH] scripts: flatpak: check .local directory for steam library --- scripts/flatpak/run.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) mode change 100644 => 100755 scripts/flatpak/run.sh diff --git a/scripts/flatpak/run.sh b/scripts/flatpak/run.sh old mode 100644 new mode 100755 index 601276809c..e347669e55 --- a/scripts/flatpak/run.sh +++ b/scripts/flatpak/run.sh @@ -3,12 +3,16 @@ echo "Xash3D FWGS installed as Flatpak." # TODO: detect by libraryfolders.vdf and installed apps -HALFLIFESTEAMDIR="$HOME/.steam/steam/steamapps/common/Half-Life" +HALFLIFESTEAMDIRS="$HOME/.local/share/Steam/steamapps/common/Half-Life $HOME/.steam/steam/steamapps/common/Half-Life" -if [ -d "$HALFLIFESTEAMDIR" ]; then - echo "Detected Half-Life installation in $HALFLIFESTEAMDIR, using as RoDir" - export XASH3D_RODIR=$HALFLIFESTEAMDIR -fi +for i in $HALFLIFESTEAMDIRS; do +# echo $i + if [ -d "$i" ]; then + echo "Detected Half-Life installation in $i, using as RoDir" + export XASH3D_RODIR=$i + break + fi +done XASHDATADIR="$HOME/.xash/"