X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=MODULES.html.sh;h=fb474ea6394c057e13a3b5fb283909b82c9e0e07;hb=6e0c9a99ac662dd811105992a9c9f5f611569590;hp=6a9491f58ab87264e58e8652da5ca2e2b3dd78de;hpb=ed745b72ec4326be2debb459b45e291cfa5eee95;p=gnulib.git
diff --git a/MODULES.html.sh b/MODULES.html.sh
index 6a9491f58..fb474ea63 100755
--- a/MODULES.html.sh
+++ b/MODULES.html.sh
@@ -1,6 +1,26 @@
#!/bin/sh
+#
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+
# Usage: MODULES.html.sh > MODULES.html
+PATH=`dirname $0`:$PATH; export PATH
+
sed_lt='s,<,\<,g'
sed_gt='s,>,\>,g'
sed_escape_dot='s,\.,\\.,g'
@@ -9,7 +29,7 @@ trnl='\012'
indent=""
missed_modules=`gnulib-tool --list`
-missed_files=`ls lib/* m4/* | sed -e /CVS/d -e /README/d -e /ChangeLog/d -e /Makefile/d -e /TODO/d`
+missed_files=`ls -d lib/* m4/* | sed -e /CVS/d -e /README/d -e /ChangeLog/d -e /Makefile/d -e /TODO/d -e '/~$/d'`
# func_echo line
# outputs line with indentation.
@@ -78,7 +98,11 @@ func_module ()
{
func_begin TR
- element=`gnulib-tool --extract-include-directive $1 | sed -e "$sed_lt" -e "$sed_gt" -e '${/^$/d}' | sed -e 's/$/
/' | tr -d "$trnl" | sed -e 's/
$//'`
+ sed_remove_trailing_empty_line='${
+/^$/d
+}'
+
+ element=`gnulib-tool --extract-include-directive $1 | sed -e "$sed_lt" -e "$sed_gt" -e "$sed_remove_trailing_empty_line" | sed -e 's/$/
/' | tr -d "$trnl" | sed -e 's/
$//'`
test -n "$element" || element='---'
func_echo "