diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2026-06-28 08:53:32 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2026-06-28 08:53:32 +0300 |
| commit | 8909d38747b36c2ded39e82368ef6eb7c5b9b392 (patch) | |
| tree | 52c587071f5214f96a350f5be84d92c109e27681 /faugus_run_bwrap.sh | |
| parent | 22d7f401898d1caf4ddba4f5ecc3e75715c8ecf4 (diff) | |
| download | fungus-launcher-game-dirs.tar.gz fungus-launcher-game-dirs.tar.xz | |
unhardcode game paths game-dirs
Diffstat (limited to 'faugus_run_bwrap.sh')
| -rw-r--r-- | faugus_run_bwrap.sh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/faugus_run_bwrap.sh b/faugus_run_bwrap.sh index 31aeaec..2c683e0 100644 --- a/faugus_run_bwrap.sh +++ b/faugus_run_bwrap.sh @@ -1,4 +1,4 @@ -#!/usr/bin/sh -x +#!/usr/bin/bash -x # we only set those if DRI_PRIME is set (use discrete gpu is checked) # DRI_PRIME=1 is not enough for nvidia, it works but handoff is slow @@ -13,6 +13,15 @@ if [ "${DRI_PRIME}" = "1" ]; then __GLX_VENDOR_LIBRARY_NAME=nvidia fi +bwrap_args=() + +# parse NULL-separated GAME_DIRS into a list of readonly binds +if [ -n "$GAME_DIRS" ]; then + while IFS= read -r -d '' dir; do + bwrap_args+=(--ro-bind "$dir" "$dir") + done < <(printf '%s\0' "$GAME_DIRS") +fi + bwrap \ --die-with-parent \ --as-pid-1 \ @@ -36,15 +45,12 @@ bwrap \ --ro-bind /usr/bin /bin \ --ro-bind /etc /etc \ --ro-bind /sys /sys \ + "${bwrap_args[@]}" \ --bind ${XDG_RUNTIME_DIR} ${XDG_RUNTIME_DIR} \ --bind /tmp /tmp \ --proc /proc \ --dev-bind /dev /dev \ - --ro-bind /mnt/stuff/Games /mnt/stuff/Games \ - --bind /mnt/games /mnt/games \ - --symlink /mnt/games ~/Games \ --bind "${WINEPREFIX}" "${WINEPREFIX}" \ - --bind ~/CloudSaves ~/CloudSaves \ --bind ~/.local/share/umu ~/.local/share/umu \ --ro-bind ~/.config/faugus-launcher/games.json ~/.config/faugus-launcher/games.json \ --ro-bind ~/.config/faugus-launcher/config.ini ~/.config/faugus-launcher/config.ini \ |
