appimage-run: pass arguments to appimage

This commit is contained in:
Timo Kaufmann 2019-03-09 22:11:47 +01:00
parent 6af25fd1ad
commit 19e075b53b

View file

@ -13,10 +13,12 @@ in buildFHSUserEnv (fhsArgs // {
if [ $# -eq 0 ]; then
echo "Usage: $0 FILE [OPTION...]"
echo
echo 'Options are passed on to the appimage.'
echo "If you want to execute a custom command in the appimage's environment, set the APPIMAGE_DEBUG_EXEC environment variable."
exit 1
fi
APPIMAGE="$(realpath "$1")"
shift
if [ ! -x "$APPIMAGE" ]; then
echo "fatal: $APPIMAGE is not executable"
@ -49,6 +51,6 @@ in buildFHSUserEnv (fhsArgs // {
exec "$APPIMAGE_DEBUG_EXEC"
fi
exec ./AppRun
exec ./AppRun "$@"
'';
})