Browse Source

use same app supp in menu/doc scripts as defined in startup script

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@39948 15284696-431f-4ddb-bdfa-cd5b030d7da7
William Kyngesburye 15 years ago
parent
commit
d9e64c6763
3 changed files with 10 additions and 8 deletions
  1. 3 3
      macosx/app/build_gui_user_menu.sh
  2. 5 5
      macosx/app/build_html_user_index.sh
  3. 2 0
      macosx/app/grass.sh.in

+ 3 - 3
macosx/app/build_gui_user_menu.sh

@@ -12,9 +12,9 @@
 # may be my limited knowledge of sh scripting and there could be a way.
 
 GRASS_MMVER=`cut -d . -f 1-2 "$GISBASE/etc/VERSIONNUMBER"`
-BINDIR="$HOME/Library/GRASS/$GRASS_MMVER/Modules/bin"
-BINDIRG="/Library/GRASS/$GRASS_MMVER/Modules/bin"
-MENUDIR="$HOME/Library/GRASS/$GRASS_MMVER/Modules/etc"
+BINDIR="$GISBASE_USER/Modules/bin"
+BINDIRG="$GISBASE_SYSTEM/Modules/bin"
+MENUDIR="$GISBASE_USER/Modules/etc"
 
 echo "Rebuilding Addon menu..."
 

+ 5 - 5
macosx/app/build_html_user_index.sh

@@ -16,11 +16,6 @@
 
 ############# nothing to configure below ############
 
-GRASS_MMVER=`cut -d . -f 1-2 "$GISBASE/etc/VERSIONNUMBER"`
-GRASSVERSION=`cat "$GISBASE/etc/VERSIONNUMBER"`
-HTMLDIR="$HOME/Library/GRASS/$GRASS_MMVER/Modules/docs/html"
-HTMLDIRG="/Library/GRASS/$GRASS_MMVER/Modules/docs/html"
-
 # $1 is current path to GRASS.app/Contents/MacOS, defaults to /Applications
 if [ "$1" != "" ] ; then
 	GISBASE=$1
@@ -28,6 +23,11 @@ else
 	GISBASE="/Applications/GRASS-$GRASS_MMVER.app/Contents/MacOS"
 fi
 
+GRASS_MMVER=`cut -d . -f 1-2 "$GISBASE/etc/VERSIONNUMBER"`
+GRASSVERSION=`cat "$GISBASE/etc/VERSIONNUMBER"`
+HTMLDIR="$GISBASE_USER/Modules/docs/html"
+HTMLDIRG="$GISBASE_SYSTEM/Modules/docs/html"
+
 write_html_header()
 {
 # $1: filename

+ 2 - 0
macosx/app/grass.sh.in

@@ -32,7 +32,9 @@ export GISBASE
 grass_ver=`cut -d . -f 1-2 "$GISBASE/etc/VERSIONNUMBER"`
 
 GISBASE_USER="$HOME/Library/Application Support/GRASS/$grass_ver"
+export GISBASE_USER
 GISBASE_SYSTEM="/Library/Application Support/GRASS/$grass_ver"
+export GISBASE_SYSTEM
 
 # for extra utils
 # ideally user should have these in their PATH, but make sure here