cadence/data/cadence-session-start

28 lines
797 B
Plaintext
Raw Permalink Normal View History

#!/bin/bash
if [ -f /usr/bin/python3 ]; then
PYTHON=/usr/bin/python3
else
PYTHON=python
fi
INSTALL_PREFIX="X-PREFIX-X"
2015-04-18 15:15:38 +03:00
if [ "$1"x == "--system-start-by-x11-startup"x ]; then
# called via $STARTUP in 61-cadence-session-inject.sh
$PYTHON $INSTALL_PREFIX/share/cadence/src/cadence_session_start.py --system-start &
2015-04-18 15:15:38 +03:00
shift
2015-04-19 00:26:01 +03:00
if [ "$1"x != ""x ]; then
exec "$@"
else
exec x-session-manager
fi
elif [ "$1"x == "--maybe-system-start"x ]; then
# called via autostart cadence-session-start.desktop
# this will check if jack is already running before trying to restart things
exec $PYTHON $INSTALL_PREFIX/share/cadence/src/cadence_session_start.py --system-start-desktop
else
# called by user
exec $PYTHON $INSTALL_PREFIX/share/cadence/src/cadence_session_start.py "$@"
fi