grass.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. #! /bin/sh
  2. #############################################################################
  3. #
  4. # MODULE: GRASS initialization (Shell)
  5. # AUTHOR(S): Original author unknown - probably CERL
  6. # Andreas Lange - Germany - andreas.lange@rhein-main.de
  7. # Huidae Cho - Korea - grass4u@gmail.com
  8. # Justin Hickey - Thailand - jhickey@hpcc.nectec.or.th
  9. # Markus Neteler - Germany/Italy - neteler@itc.it
  10. # Hamish Bowman - New Zealand - hamish_b at yahoo,com
  11. # PURPOSE: Sets up some environment variables.
  12. # It also parses any remaining command line options for
  13. # setting the GISDBASE, LOCATION, and/or MAPSET.
  14. # Finally it starts GRASS with the appropriate user
  15. # interface and cleans up after it is finished.
  16. # COPYRIGHT: (C) 2000-2021 by the GRASS Development Team
  17. #
  18. # This program is free software under the GNU General
  19. # Public License (>=v2). Read the file COPYING that
  20. # comes with GRASS for details.
  21. #
  22. #############################################################################
  23. trap "echo 'User break!' ; exit" 2 3 9 15
  24. if [ -z "$GRASS_PYTHON" ] ; then
  25. GRASS_PYTHON=python3
  26. fi
  27. export GRASS_PYTHON
  28. exec "$GRASS_PYTHON" "@BINDIR@/grass.py" "$@" &