[GRASS-SVN] r30101 - grass/trunk/gui/wxpython
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Feb 12 10:34:34 EST 2008
Author: martinl
Date: 2008-02-12 10:34:34 -0500 (Tue, 12 Feb 2008)
New Revision: 30101
Modified:
grass/trunk/gui/wxpython/wxgui
Log:
wxGUI: shell script updated to use GRASS parser
Modified: grass/trunk/gui/wxpython/wxgui
===================================================================
--- grass/trunk/gui/wxpython/wxgui 2008-02-12 13:28:45 UTC (rev 30100)
+++ grass/trunk/gui/wxpython/wxgui 2008-02-12 15:34:34 UTC (rev 30101)
@@ -1,13 +1,33 @@
#!/bin/sh
+#% Module
+#% description: wxPython-based GUI for GRASS GIS
+#% keywords: general, gui
+#% End
+#%option
+#% key: dmrc
+#% type: string
+#% description: Name of Layer Manager settings file (.grc)
+#% required : no
+#%End
+
if [ -z "$GISBASE" ] ; then
echo "You must be in GRASS GIS to run this program." 1>&2
exit 1
fi
-if [ ! -z "$1" ] ; then
+if [ $# -eq 0 ] ; then
+ python "$GISBASE/etc/wxpython/wxgui.py" &
+ exit 0
+fi
+
+if [ "$1" != "@ARGS_PARSED@" ] ; then
+ exec g.parser "$0" "$@"
+fi
+
+if test -n "$GIS_OPT_DMRC" ; then
# load workspace file
- python "$GISBASE/etc/wxpython/wxgui.py" "--workspace" "$1" &
+ python "$GISBASE/etc/wxpython/wxgui.py" "--workspace" "$GIS_OPT_DMRC" &
else
python "$GISBASE/etc/wxpython/wxgui.py" &
fi
More information about the grass-commit
mailing list