[GRASS-SVN] r36071 - grass/trunk/lib/init

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 24 00:16:34 EST 2009


Author: hamish
Date: 2009-02-24 00:16:33 -0500 (Tue, 24 Feb 2009)
New Revision: 36071

Modified:
   grass/trunk/lib/init/functions.sh
   grass/trunk/lib/init/grass.bat
   grass/trunk/lib/init/grass7.html
   grass/trunk/lib/init/init.bat
   grass/trunk/lib/init/init.sh
Log:
sync with devbr6: -wx alias, smaller prompt, don't try and clean non-existent .tmp files

Modified: grass/trunk/lib/init/functions.sh
===================================================================
--- grass/trunk/lib/init/functions.sh	2009-02-24 05:01:00 UTC (rev 36070)
+++ grass/trunk/lib/init/functions.sh	2009-02-24 05:16:33 UTC (rev 36071)
@@ -10,7 +10,7 @@
     cat <<-EOF
 	Usage:
 	  $CMD_NAME [-h | -help | --help] [-v | --version] [-c]
-		  [-text | -gui | -wxpython]
+		  [-text | -gui | -wxpython | -wx]
 		  [[[<GISDBASE>/]<LOCATION_NAME>/]<MAPSET>]
 	
 	Flags:
@@ -21,7 +21,7 @@
 	                                   and set as default
 	  -gui                           use graphical user interface ($DEFAULT_GUI by default)
 	                                   and set as default
-	  -wxpython                      use wxPython based graphical user interface
+	  -wxpython or -wx               use wxPython based graphical user interface
 	                                   and set as default
 	
 	Parameters:

Modified: grass/trunk/lib/init/grass.bat
===================================================================
--- grass/trunk/lib/init/grass.bat	2009-02-24 05:01:00 UTC (rev 36070)
+++ grass/trunk/lib/init/grass.bat	2009-02-24 05:16:33 UTC (rev 36071)
@@ -29,5 +29,5 @@
 rem set GRASS_PROJSHARE=c:/grass/share/proj
 
 set WINGISBASE=GISBASE_VALUE
-"%WINGISBASE%\etc\init.bat" %*
+"%WINGISBASE%\etc\Init.bat" %*
 

Modified: grass/trunk/lib/init/grass7.html
===================================================================
--- grass/trunk/lib/init/grass7.html	2009-02-24 05:01:00 UTC (rev 36070)
+++ grass/trunk/lib/init/grass7.html	2009-02-24 05:16:33 UTC (rev 36071)
@@ -17,7 +17,7 @@
 <H2>SYNOPSIS</H2>
 
 <B>grass70</B> [<B>-</B>] [<B>-v</B>] [<B>-h | -help | --help</B>]
-    [<B>-text | -gui | -wxpython]</B>]
+    [<B>-text | -gui | -wxpython | -wx]</B>]
     [[[<B>&lt;GISDBASE&gt;/</B>]<B>&lt;LOCATION_NAME&gt;/</B>]
     	<B>&lt;MAPSET&gt;</B>]
 
@@ -67,7 +67,7 @@
 <DT><B>-text</B>
 <DD> Indicates that the text based user interface should be used
 
-<DT><B>-gui</B> (or <B>-wxpython</B>)
+<DT><B>-gui</B> (or <B>-wxpython</B>, or <B>-wx</B>)
 <DD> Indicates that the new Python based graphical user interface should be used
 
 <DT><B>-v</B> <B>--version</B>

Modified: grass/trunk/lib/init/init.bat
===================================================================
--- grass/trunk/lib/init/init.bat	2009-02-24 05:01:00 UTC (rev 36070)
+++ grass/trunk/lib/init/init.bat	2009-02-24 05:16:33 UTC (rev 36071)
@@ -53,23 +53,28 @@
 :aftertextcheck
 
 if "%1" == "-gui" goto setguimode
+if "%1" == "-wx" goto setguimode
+if "%1" == "-wxpython" goto setguimode
+
 :afterguicheck
 
+if exist "%WINGISRC%" (
+   set HAVE_GISRC=true
+   goto aftercreategisrc
+)
 
-if exist "%WINGISRC%" goto aftercreategisrc
-
+set HAVE_GISRC=false
 rem Create an initial GISRC file based on current directory
 "%WINGISBASE%\etc\echo" "GISDBASE: %CD%" | g.dirseps -g > "%WINGISRC%"
 "%WINGISBASE%\etc\echo" "LOCATION_NAME: <UNKNOWN>" >> "%WINGISRC%"
 "%WINGISBASE%\etc\echo" "MAPSET: <UNKNOWN>" >> "%WINGISRC%"
-	    
+
 :aftercreategisrc
 
 rem Now set the real GISRC
 FOR /F "usebackq delims==" %%i IN (`g.dirseps -g "%WINGISRC%"`) DO @set GISRC=%%i
 
 rem Set GRASS_GUI
-
 if "%GRASS_GUI%" == "" (
   FOR /F "usebackq delims==" %%i IN (`g.gisenv "get=GRASS_GUI"`) DO @set GRASS_GUI=%%i
 ) else (
@@ -79,10 +84,12 @@
 rem Set wxpython as default if not specified elsewhere
 if "%GRASS_GUI%"=="" set GRASS_GUI=wxpython
 
+rem Clean out old .tmp files from the mapset
+if "%HAVE_GISRC%"=="true" (
+  "%WINGISBASE%\etc\clean_temp" > NUL:
+)
+set HAVE_GISRC=
 
-"%WINGISBASE%\etc\clean_temp" > NUL:
-
-
 if "%GRASS_GUI%"=="text" goto text
 
 rem if return ok, wxpython start:
@@ -121,7 +128,7 @@
 "%WINGISBASE%\etc\echo" "See the licence terms with:              g.version -c"
 "%WINGISBASE%\etc\echo" ""
 
-prompt GRASS %GRASS_VERSION% $C%LOCATION_NAME%$F:$P $G
+prompt GRASS %GRASS_VERSION% $C%LOCATION_NAME%$F$G 
 
 cmd.exe
 
@@ -149,6 +156,9 @@
 
 :exitinit
 
+rem Clean out old .tmp files from the mapset
+"%WINGISBASE%\etc\clean_temp" > NUL:
+
 set PATH=%SAVEPATH%
 set SAVEPATH=
 exit /b

Modified: grass/trunk/lib/init/init.sh
===================================================================
--- grass/trunk/lib/init/init.sh	2009-02-24 05:01:00 UTC (rev 36070)
+++ grass/trunk/lib/init/init.sh	2009-02-24 05:16:33 UTC (rev 36071)
@@ -119,7 +119,7 @@
         ;;
 
     # Check if the -wxpython flag was given
-    -wxpython)
+    -wxpython | -wx)
         GRASS_GUI="wxpython"
         shift
         ;;



More information about the grass-commit mailing list