Fix build with gcc 4.7
[cadence.git] / data / catarina
bloba06a285c1ecc34274d3e9642573616ba8d032907
1 #!/bin/bash
3 # Check if already running
5 PROCS=`ps -ea -f | grep /share/cadence/src/catarina.py | grep python`
7 if [ x"$PROCS" != x"" ]; then
9 # One instance only
10 PROC=`echo "$PROCS" | head -n 1`
12 # Get PID
13 PID=`echo "$PROC" | awk '{printf$2}'`
15 # Last check, just to make sure
16 if [ x"$PID" != x"" ]; then
18 # Tell user about this
19 echo "Cadence already started, showing GUI now..."
21 # Send SIGUSR2, shows the GUI
22 kill -USR2 "$PID"
24 # Quit now
25 exit
32 if [ -f /usr/bin/python2 ]; then
33 PYTHON=/usr/bin/python2
34 else
35 PYTHON=python
38 # We only got here if not running yet
39 INSTALL_PREFIX="X-PREFIX-X"
40 exec $PYTHON $INSTALL_PREFIX/share/cadence/src/catarina.py "$@"