debian/x-grass
raw| 1 | #!/bin/sh |
| 2 | # |
| 3 | # This is a wrapper to call GRASS without a running (x)terminal. |
| 4 | # |
| 5 | |
| 6 | if [ -n "$DISPLAY" ]; then |
| 7 | if [ -n "$(tty)" ]; then |
| 8 | exec /usr/bin/grass "$@" |
| 9 | else |
| 10 | exec x-terminal-emulator -e /bin/sh -c "/usr/bin/grass $@" |
| 11 | fi |
| 12 | else |
| 13 | if [ -n "$(tty)" ]; then |
| 14 | exec /usr/bin/grass "$@" |
| 15 | fi |
| 16 | fi |
| 17 | |
| 18 | # Cannot run without a terminal |
| 19 | exit 255 |