Arch(dev): AGS wrapper hardening — cd $HOME, proper --, GI paths, ensure ESM perms
- Wrapper now cds to $HOME, forwards args via "--" to avoid gjs parsing, expands GI_TYPELIB_PATH (incl. /usr/lib64/ags:/usr/lib/ags), and sets LD_LIBRARY_PATH for /usr/local libs. - Ensure ESM entry com.github.Aylur.ags is 0644 under /usr/local/share and /usr/share. Aligns Arch installer with Fedora fix; resolves "unknown option" and read-permission issues for `ags -t overview`.
This commit is contained in:
@@ -109,12 +109,16 @@ if git clone --depth=1 https://github.com/JaKooLit/ags_v1.9.0.git; then
|
|||||||
sudo tee /usr/local/bin/ags >/dev/null <<WRAP
|
sudo tee /usr/local/bin/ags >/dev/null <<WRAP
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
cd "$HOME" 2>/dev/null || true
|
||||||
# Ensure GI typelibs and native libs are discoverable before gjs ESM loads
|
# Ensure GI typelibs and native libs are discoverable before gjs ESM loads
|
||||||
export GI_TYPELIB_PATH="/usr/local/lib64/girepository-1.0:/usr/local/lib/girepository-1.0:/usr/lib64/girepository-1.0:/usr/lib/girepository-1.0:/usr/local/lib64:/usr/local/lib:/usr/lib64/ags:/usr/lib/ags:${GI_TYPELIB_PATH:-}"
|
export GI_TYPELIB_PATH="/usr/local/lib64:/usr/local/lib:/usr/local/lib64/girepository-1.0:/usr/local/lib/girepository-1.0:/usr/lib64/girepository-1.0:/usr/lib/girepository-1.0:/usr/lib64/ags:/usr/lib/ags:${GI_TYPELIB_PATH-}"
|
||||||
export LD_LIBRARY_PATH="/usr/local/lib64:/usr/local/lib:${LD_LIBRARY_PATH:-}"
|
export LD_LIBRARY_PATH="/usr/local/lib64:/usr/local/lib:${LD_LIBRARY_PATH-}"
|
||||||
exec /usr/bin/gjs -m "$MAIN_JS" "$@"
|
exec /usr/bin/gjs -m "$MAIN_JS" -- "$@"
|
||||||
WRAP
|
WRAP
|
||||||
sudo chmod 0755 /usr/local/bin/ags
|
sudo chmod 0755 /usr/local/bin/ags
|
||||||
|
# Ensure ESM entry is readable by gjs
|
||||||
|
sudo chmod 0644 /usr/local/share/com.github.Aylur.ags/com.github.Aylur.ags 2>/dev/null || true
|
||||||
|
sudo chmod 0644 /usr/share/com.github.Aylur.ags/com.github.Aylur.ags 2>/dev/null || true
|
||||||
printf "${OK} AGS wrapper installed at /usr/local/bin/ags\n"
|
printf "${OK} AGS wrapper installed at /usr/local/bin/ags\n"
|
||||||
else
|
else
|
||||||
printf "${WARN} Launcher not found at $LAUNCHER, skipping patch.\n"
|
printf "${WARN} Launcher not found at $LAUNCHER, skipping patch.\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user