[GRASS-SVN] r37166 - grass/trunk/general/g.mapsets

svn_grass at osgeo.org svn_grass at osgeo.org
Mon May 11 13:12:57 EDT 2009


Author: hamish
Date: 2009-05-11 13:12:57 -0400 (Mon, 11 May 2009)
New Revision: 37166

Modified:
   grass/trunk/general/g.mapsets/Makefile
   grass/trunk/general/g.mapsets/main.c
Log:
don't hardcode python.exe, install helper script in correct dir

Modified: grass/trunk/general/g.mapsets/Makefile
===================================================================
--- grass/trunk/general/g.mapsets/Makefile	2009-05-11 15:00:07 UTC (rev 37165)
+++ grass/trunk/general/g.mapsets/Makefile	2009-05-11 17:12:57 UTC (rev 37166)
@@ -2,7 +2,7 @@
 MODULE_TOPDIR = ../..
 
 PGM = g.mapsets
-GUI = $(ETC)/gui/g.mapsets.py
+GUI = $(ETC)/gui/scripts/g.mapsets.py
 
 LIBES     = $(GISLIB)
 DEPENDENCIES= $(GISDEP)
@@ -11,7 +11,8 @@
 
 default: cmd $(GUI)
 
-$(ETC)/gui/%: %
+$(ETC)/gui/scripts/%: %
 	if [ ! -d $(ETC) ]; then $(MKDIR) $(ETC); fi
 	if [ ! -d $(ETC)/gui ]; then $(MKDIR) $(ETC)/gui; fi
+	if [ ! -d $(ETC)/gui/scripts ]; then $(MKDIR) $(ETC)/gui/scripts; fi
 	$(INSTALL) $< $@

Modified: grass/trunk/general/g.mapsets/main.c
===================================================================
--- grass/trunk/general/g.mapsets/main.c	2009-05-11 15:00:07 UTC (rev 37165)
+++ grass/trunk/general/g.mapsets/main.c	2009-05-11 17:12:57 UTC (rev 37166)
@@ -113,8 +113,8 @@
     }
 
     if (opt.dialog->answer) {
-	sprintf(path, "%s/etc/gui/g.mapsets.py", G_gisbase());
-	G_spawn("python", "g.mapsets.py", path, NULL);
+	sprintf(path, "%s/etc/gui/scripts/g.mapsets.py", G_gisbase());
+	G_spawn(getenv("GRASS_PYTHON"), "g.mapsets.py", path, NULL);
     }
 
     if (opt.mapset->answer) {



More information about the grass-commit mailing list