[GRASS-SVN] r49925 - grass/trunk/lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Dec 26 16:14:37 EST 2011
Author: martinl
Date: 2011-12-26 13:14:37 -0800 (Mon, 26 Dec 2011)
New Revision: 49925
Removed:
grass/trunk/lib/init/grass_intro.txt
grass/trunk/lib/init/welcome.txt
Modified:
grass/trunk/lib/init/Makefile
grass/trunk/lib/init/grass.py
Log:
grass.py: replace grass_intro.txt and welcome.txt files by included text
Modified: grass/trunk/lib/init/Makefile
===================================================================
--- grass/trunk/lib/init/Makefile 2011-12-26 20:08:33 UTC (rev 49924)
+++ grass/trunk/lib/init/Makefile 2011-12-26 21:14:37 UTC (rev 49925)
@@ -23,9 +23,7 @@
$(ETC)/lock$(EXE) \
$(ETC)/run$(EXE) \
$(ETC)/echo$(EXE) \
- $(ETC)/grass_intro \
$(ETC)/license \
- $(ETC)/welcome \
$(ETC)/VERSIONNUMBER \
$(ETC)/prompt.py \
$(HTMLDIR)/help_loc_struct.png \
@@ -105,7 +103,7 @@
fi
chmod +r $@
-$(ETC)/grass_intro $(ETC)/license $(ETC)/welcome: $(ETC)/%: %.txt version.sed
+$(ETC)/license: $(ETC)/%: %.txt version.sed
rm -f $@
sh ./version.sed "$(GRASS_VERSION_NUMBER)" "$(GRASS_VERSION_DATE)" "$(GRASS_VERSION_UPDATE_PKG)" $< > $@
chmod +r $@
Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py 2011-12-26 20:08:33 UTC (rev 49924)
+++ grass/trunk/lib/init/grass.py 2011-12-26 21:14:37 UTC (rev 49925)
@@ -418,22 +418,27 @@
os.environ['GRASS_HTML_BROWSER'] = browser
def grass_intro():
- if locale:
- path = gfile("locale", locale, "etc", "grass_intro")
- if not os.access(path, os.R_OK):
- path = gfile("etc", "grass_intro")
- else:
- path = gfile("etc", "grass_intro")
- f = open(path, 'r')
- for line in f:
- sys.stderr.write(line)
- f.close()
+ intro = r"""
+WELCOME TO GRASS %s
+
+ 1) Have at your side all available GRASS tutorials
+
+ 2) When working on your location, the following materials
+ are extremely useful:
+ - A topo map of your area
+ - Current catalog of available computer maps
+
+ 3) Check the GRASS webpages for feedback mailinglists and more:
+ http://grass.osgeo.org
+ http://www.grass-gis.org
+""" % grass_version
+ sys.stderr.write(intro)
sys.stderr.write("\n")
sys.stderr.write(_("Hit RETURN to continue"))
sys.stdin.readline()
- #for convenience, define pwd as GISDBASE:
+ # for convenience, define pwd as GISDBASE:
s = r"""GISDBASE: %s
LOCATION_NAME: <UNKNOWN>
MAPSET: <UNKNOWN>
@@ -747,14 +752,7 @@
def say_hello():
- if locale:
- path = gfile("locale", locale, "etc", "welcome")
- if not os.access(path, os.R_OK):
- path = gfile("etc", "welcome")
- else:
- path = gfile("etc", "welcome")
- s = readfile(path)
- sys.stderr.write(s)
+ sys.stderr.write(_("Welcome to GRASS %s") % grass_version)
def show_info():
sys.stderr.write(
Deleted: grass/trunk/lib/init/grass_intro.txt
===================================================================
--- grass/trunk/lib/init/grass_intro.txt 2011-12-26 20:08:33 UTC (rev 49924)
+++ grass/trunk/lib/init/grass_intro.txt 2011-12-26 21:14:37 UTC (rev 49925)
@@ -1,13 +0,0 @@
-
-WELCOME TO GRASS GRASS_VERSION_NUMBER (GRASS_VERSION_DATE)
-
- 1) Have at your side all available GRASS tutorials
-
- 2) When working on your location, the following materials
- are extremely useful:
- - A topo map of your area
- - Current catalog of available computer maps
-
- 3) Check the GRASS webpages for feedback mailinglists and more:
- http://grass.osgeo.org
- http://www.grass-gis.org
Deleted: grass/trunk/lib/init/welcome.txt
===================================================================
--- grass/trunk/lib/init/welcome.txt 2011-12-26 20:08:33 UTC (rev 49924)
+++ grass/trunk/lib/init/welcome.txt 2011-12-26 21:14:37 UTC (rev 49925)
@@ -1 +0,0 @@
-Welcome to GRASS GRASS_VERSION_NUMBER (GRASS_VERSION_DATE) GRASS_VERSION_UPDATE_PKG
More information about the grass-commit
mailing list