This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-10-13 21:27:42 -04:00
1 parent 4163b31b02
commit 83ec5708ed
852 files changed
+4844 -46144

No files matched your search

@@ -1,18 +1,14 @@
#!/bin/bash
# A script added on the Desktop page (UserApps), run from its own folder:
# droiddeck-script-run /opt/droiddeck-apps/<id> [args...]
set -u
dir=${1:?usage: droiddeck-script-run <added app directory> [args...]}
shift
entry=$(cat "$dir/entry" 2>/dev/null) || { echo "droiddeck-script-run: $dir has no entry" >&2; exit 127; }
cd -P "$dir/files" 2>/dev/null || { echo "droiddeck-script-run: $dir/files is missing; add the script again" >&2; exit 127; }
folder=$PWD
# Shared storage is noexec, so the script is handed to its interpreter rather than executed.
first=
IFS= read -r first < "$entry"
first=${first%$'\r'}
interp=(/bin/bash)
# A program as the entry (the desktop's copy of a game's folder) runs itself.
case $first in '#!'*) read -r -a interp <<< "${first#'#!'}" ;; $'\x7f'ELF*) interp=() ;; esac
fex=$(cat "$dir/fex" 2>/dev/null)
case $fex in on|off) ;; *) fex=auto ;; esac
@@ -31,7 +27,6 @@ case ${DBUS_SESSION_BUS_ADDRESS:-} in
fi ;;
esac
rc=$?
# A launcher script often starts the game and returns; the session lasts while it runs.
running() {
local p exe arg cwd
for p in /proc/[0-9]*; do