Collection of tools useful for audio production
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
704B

  1. #!/bin/bash
  2. # Check if already running
  3. PROCS=`ps -f -u $USER | grep /share/cadence/src/catia.py | grep python`
  4. if [ x"$PROCS" != x"" ]; then
  5. # One instance only
  6. PROC=`echo "$PROCS" | head -n 1`
  7. # Get PID
  8. PID=`echo "$PROC" | awk '{printf$2}'`
  9. # Last check, just to make sure
  10. if [ x"$PID" != x"" ]; then
  11. # Tell user about this
  12. echo "Catia already started, showing GUI now..."
  13. # Send SIGUSR2, shows the GUI
  14. kill -USR2 "$PID"
  15. # Quit now
  16. exit
  17. fi
  18. fi
  19. if [ -f /usr/bin/python3 ]; then
  20. PYTHON=/usr/bin/python3
  21. else
  22. PYTHON=python
  23. fi
  24. # We only got here if not running yet
  25. INSTALL_PREFIX="X-PREFIX-X"
  26. exec $PYTHON $INSTALL_PREFIX/share/cadence/src/catia.py "$@"