2012-09-09 14:21:29 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ -f /usr/bin/python3 ]; then
|
|
|
|
PYTHON=/usr/bin/python3
|
|
|
|
else
|
|
|
|
PYTHON=python
|
|
|
|
fi
|
|
|
|
|
|
|
|
INSTALL_PREFIX="X-PREFIX-X"
|
2015-04-17 17:59:16 +03:00
|
|
|
|
2015-04-18 15:15:38 +03:00
|
|
|
if [ "$1"x == "--system-start-by-x11-startup"x ]; then
|
2020-11-30 03:01:34 +02:00
|
|
|
# called via $STARTUP in 61-cadence-session-inject.sh
|
2015-04-17 17:59:16 +03:00
|
|
|
$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
|
2015-08-20 14:26:41 +03:00
|
|
|
elif [ "$1"x == "--maybe-system-start"x ]; then
|
|
|
|
# called via autostart cadence-session-start.desktop
|
2015-09-03 16:43:43 +03:00
|
|
|
# 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
|
2015-04-17 17:59:16 +03:00
|
|
|
else
|
2015-08-20 14:26:41 +03:00
|
|
|
# called by user
|
2015-04-17 17:59:16 +03:00
|
|
|
exec $PYTHON $INSTALL_PREFIX/share/cadence/src/cadence_session_start.py "$@"
|
|
|
|
fi
|