28 lines
797 B
Bash
Executable File
28 lines
797 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ -f /usr/bin/python3 ]; then
|
|
PYTHON=/usr/bin/python3
|
|
else
|
|
PYTHON=python
|
|
fi
|
|
|
|
INSTALL_PREFIX="X-PREFIX-X"
|
|
|
|
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 &
|
|
shift
|
|
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
|