fix: build the patched gamescope in the user's cache folder, not /tmp (a tmpfs in the installer's chroot)

This commit is contained in:
theupriser committed 2026-10-13 18:37:21 +02:00
1 parent 7d5cc00380
commit bc49009fcc
1 file changed
+3 -2
+3 -2
View File
@@ -28,8 +28,9 @@ gsn_install_package() {
gsn_package_installed && return 0 gsn_package_installed && return 0
info "Building the patched gamescope for NVIDIA (a few minutes)..." info "Building the patched gamescope for NVIDIA (a few minutes)..."
sudo pacman -S --needed --noconfirm base-devel git || { err "Installing the build tools failed."; return 1; } sudo pacman -S --needed --noconfirm base-devel git || { err "Installing the build tools failed."; return 1; }
local dir pkg local dir pkg cache="${XDG_CACHE_HOME:-$HOME/.cache}/steamify"
dir="$(mktemp -d)" || return 1 # On disk, not /tmp: the installer's chroot has a tmpfs there (RAM), and the build is 1-2 GB.
mkdir -p "$cache" && dir="$(mktemp -d -p "$cache" gamescope-build.XXXXXX)" || return 1
patch_file gamescope-nvidia.PKGBUILD > "$dir/PKGBUILD" && patch_file gamescope-nvidia.PKGBUILD > "$dir/PKGBUILD" &&
patch_file gamescope-gbm-scanout.patch > "$dir/gamescope-gbm-scanout.patch" || { patch_file gamescope-gbm-scanout.patch > "$dir/gamescope-gbm-scanout.patch" || {
err "Couldn't write the build files." err "Couldn't write the build files."