appimage-run: pass arguments to appimage
This commit is contained in:
parent
6af25fd1ad
commit
19e075b53b
@ -13,10 +13,12 @@ in buildFHSUserEnv (fhsArgs // {
|
|||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
echo "Usage: $0 FILE [OPTION...]"
|
echo "Usage: $0 FILE [OPTION...]"
|
||||||
echo
|
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."
|
echo "If you want to execute a custom command in the appimage's environment, set the APPIMAGE_DEBUG_EXEC environment variable."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
APPIMAGE="$(realpath "$1")"
|
APPIMAGE="$(realpath "$1")"
|
||||||
|
shift
|
||||||
|
|
||||||
if [ ! -x "$APPIMAGE" ]; then
|
if [ ! -x "$APPIMAGE" ]; then
|
||||||
echo "fatal: $APPIMAGE is not executable"
|
echo "fatal: $APPIMAGE is not executable"
|
||||||
@ -49,6 +51,6 @@ in buildFHSUserEnv (fhsArgs // {
|
|||||||
exec "$APPIMAGE_DEBUG_EXEC"
|
exec "$APPIMAGE_DEBUG_EXEC"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec ./AppRun
|
exec ./AppRun "$@"
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user