[GRASS-SVN] r64438 - grass/branches/releasebranch_6_4/lib/init

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 3 11:51:24 PST 2015


Author: wenzeslaus
Date: 2015-02-03 11:51:24 -0800 (Tue, 03 Feb 2015)
New Revision: 64438

Modified:
   grass/branches/releasebranch_6_4/lib/init/init.sh
Log:
startup: do not show welcome message and require 'hit return' when running a batch job

 * when GRASS_BATCH_JOB is defined and it was a first time user run, welcome message was shows and the user was required to 'Hit RETURN' (press Enter) which is not possible for batch job
 * fixes #2572 for 6.4 
 * the welcome message including 'hit return' is still present for normal user
 * r64408 in trunk removed the message completely
 * the dummy rc file with HOME as GISDBASE and UNKNOWN as LOCATION_NAME and MAPSET is still created for all first time users


Modified: grass/branches/releasebranch_6_4/lib/init/init.sh
===================================================================
--- grass/branches/releasebranch_6_4/lib/init/init.sh	2015-02-03 17:55:05 UTC (rev 64437)
+++ grass/branches/releasebranch_6_4/lib/init/init.sh	2015-02-03 19:51:24 UTC (rev 64438)
@@ -423,16 +423,18 @@
 # First time user - GISRC is defined in the GRASS script
 if [ ! -f "$GISRC" ] ; then
 
-    if [ ! -f "$GISBASE/locale/$LCL/etc/grass_intro" ] ; then
-	cat "$ETC/grass_intro"
-    else
-	cat "$GISBASE/locale/$LCL/etc/grass_intro"
+    if [ -z "$GRASS_BATCH_JOB" ] ; then
+	if [ ! -f "$GISBASE/locale/$LCL/etc/grass_intro" ] ; then
+	    cat "$ETC/grass_intro"
+	else
+	    cat "$GISBASE/locale/$LCL/etc/grass_intro"
+	fi
+
+	echo
+	echo "Hit RETURN to continue"
+	read ans
     fi
 
-    echo
-    echo "Hit RETURN to continue"
-    read ans
-
     #for convenience, define pwd as GISDBASE:
     echo "GISDBASE: $HOME" > "$GISRC"
     echo 'LOCATION_NAME: <UNKNOWN>' >> "$GISRC"



More information about the grass-commit mailing list