[GRASS-SVN] r33072 - in grass/trunk: man tools/g.html2man

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 25 19:39:05 EDT 2008


Author: glynn
Date: 2008-08-25 19:39:05 -0400 (Mon, 25 Aug 2008)
New Revision: 33072

Modified:
   grass/trunk/man/Makefile
   grass/trunk/tools/g.html2man/g.html2man.py
Log:
Use non-zero exit code if errors occur


Modified: grass/trunk/man/Makefile
===================================================================
--- grass/trunk/man/Makefile	2008-08-25 20:09:54 UTC (rev 33071)
+++ grass/trunk/man/Makefile	2008-08-25 23:39:05 UTC (rev 33072)
@@ -6,16 +6,11 @@
 SECT = 1
 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 = VERSION_NUMBER=${GRASS_VERSION_NUMBER} $(GRASS_HOME)/tools/g.html2man/g.html2man.py
 
 MANPAGES := $(patsubst $(HTMLDIR)/%.html,$(MANDIR)/%.$(SECT),$(wildcard $(HTMLDIR)/*.html))
 
-ifeq ($(PERL),no)
-default:
-else
 default: $(MANPAGES)
-endif
 
 $(MANDIR):
 	$(MKDIR) $(MANDIR)

Modified: grass/trunk/tools/g.html2man/g.html2man.py
===================================================================
--- grass/trunk/tools/g.html2man/g.html2man.py	2008-08-25 20:09:54 UTC (rev 33071)
+++ grass/trunk/tools/g.html2man/g.html2man.py	2008-08-25 23:39:05 UTC (rev 33072)
@@ -432,7 +432,7 @@
 	    if self.pop() == tag:
 		break
 
-if __name__ == "__main__":
+def main():
     # parse HTML
     inf = file(sys.argv[1])
     p = MyHTMLParser()
@@ -456,3 +456,9 @@
     outf = file(sys.argv[2], 'w')
     outf.write(s)
     outf.close()
+
+if __name__ == "__main__":
+    try:
+	main()
+    except:
+	sys.exit(1)



More information about the grass-commit mailing list