pmaports/main/postmarketos-base-ui-cage/cage-ui-session.sh
Willow Barraco c5ca6732a0
main/postmarketos-base-ui-cage: add CAGE_UI_ARGS (MR 5168)
Usefull to pass arguments to the cage exec program.

[ci:skip-build]: already built successfully in CI
2024-06-05 22:43:45 +02:00

22 lines
518 B
Bash

#!/bin/sh
. /usr/share/cage-ui/cage-ui-autorotate.sh
if [ -d /etc/cage-ui ]; then
for script in /etc/cage-ui/*.sh; do
# shellcheck source=/dev/null # since we do not control these scripts
. "$script"
done
fi
if [ -z "$CAGE_UI_COMMAND" ]; then
if command -v postmarketos-demos >/dev/null 2>&1; then
CAGE_UI_COMMAND=postmarketos-demos
else
echo "No command to run. Cage-UI expects a command to be run"
echo "defined in environment variable named CAGE_UI_COMMAND."
exit 1
fi
fi
exec $CAGE_UI_COMMAND