scripts: flatpak: check .local directory for steam library

This commit is contained in:
Alibek Omarov 2023-02-05 03:41:58 +03:00
parent 30b698067a
commit a610b1545b
1 changed files with 9 additions and 5 deletions

14
scripts/flatpak/run.sh Normal file → Executable file
View File

@ -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/"