[GRASS-SVN] r32983 - in grass/trunk: man tools/g.html2man
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Aug 21 13:03:50 EDT 2008
Author: glynn
Date: 2008-08-21 13:03:49 -0400 (Thu, 21 Aug 2008)
New Revision: 32983
Modified:
grass/trunk/man/Makefile
grass/trunk/tools/g.html2man/g.html2man.py
Log:
Fix handling of version number in manpages
Strip any leading blank lines
Modified: grass/trunk/man/Makefile
===================================================================
--- grass/trunk/man/Makefile 2008-08-21 16:23:11 UTC (rev 32982)
+++ grass/trunk/man/Makefile 2008-08-21 17:03:49 UTC (rev 32983)
@@ -7,7 +7,7 @@
MANDIR = $(GISBASE)/man/man$(SECT)
HTMLDIR = $(GISBASE)/docs/html
#HTML2MAN = GRASS_PERL=${PERL} VERSION_NUMBER=${GRASS_VERSION_NUMBER} sh $(GRASS_HOME)/tools/g.html2man/g.html2man
-HTML2MAN = $(GRASS_HOME)/tools/g.html2man/g.html2man.py
+HTML2MAN = VERSION_NUMBER=${GRASS_VERSION_NUMBER} $(GRASS_HOME)/tools/g.html2man/g.html2man.py
MANPAGES := $(patsubst $(HTMLDIR)/%.html,$(MANDIR)/%.$(SECT),$(wildcard $(HTMLDIR)/*.html))
Modified: grass/trunk/tools/g.html2man/g.html2man.py
===================================================================
--- grass/trunk/tools/g.html2man/g.html2man.py 2008-08-21 16:23:11 UTC (rev 32982)
+++ grass/trunk/tools/g.html2man/g.html2man.py 2008-08-21 17:03:49 UTC (rev 32983)
@@ -9,7 +9,7 @@
from StringIO import StringIO
try:
- version = os.environ['GRASS_VERSION_NUMBER']
+ version = os.environ['VERSION_NUMBER']
except:
version = ""
@@ -354,6 +354,7 @@
# strip excess whitespace
blank_re = re.compile("[ \t\n]*\n[ \t\n]*")
s = blank_re.sub('\n', s)
+ s = s.lstrip()
# write groff
outf = file(sys.argv[2], 'w')
More information about the grass-commit
mailing list