pmaports/main/postmarketos-ui-cage/cage-ui-session.sh
Vitaliy Ognev 9740a785b3
postmarketos-ui-cage: new aport (MR 4934)
[ci:skip-build]: already built successfully in CI
2024-03-17 11:59:27 +01:00

20 lines
476 B
Bash

#!/bin/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"