Add support for subdirectories of the 'modules/' directory.
authorBruno Haible <bruno@clisp.org>
Tue, 9 Jan 2007 13:44:33 +0000 (13:44 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 9 Jan 2007 13:44:33 +0000 (13:44 +0000)
ChangeLog
gnulib-tool

index 7155a3b..9c67e8a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-01-08  Bruno Haible  <bruno@clisp.org>
+
+       * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
+       modules directory. Filter out CVS, ChangeLog, COPYING, README also from
+       subdirectories.
+
 2007-01-08  Karl Berry  <karl@gnu.org>
 
        * doc/error.texi: mention that main() fns must set program_name
index 7b1d9ce..e3e928d 100755 (executable)
@@ -22,7 +22,7 @@
 
 progname=$0
 package=gnulib
-cvsdatestamp='$Date: 2007-01-08 19:20:07 $'
+cvsdatestamp='$Date: 2007-01-09 13:44:33 $'
 last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
 version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
 nl='
@@ -814,12 +814,18 @@ func_all_modules ()
   # Filter out unit test modules; they can be retrieved through
   # --extract-tests-module if desired.
   {
-    (cd "$gnulib_dir/modules" && ls -1)
+    (cd "$gnulib_dir" && find modules -type f -print | sed -e 's,^modules/,,')
     if test -n "$local_gnulib_dir" && test -d "$local_gnulib_dir/modules"; then
-      (cd "$local_gnulib_dir/modules" && ls -1 | sed -e 's,\.diff$,,')
+      (cd "$local_gnulib_dir" && find modules -type f -print | sed -e 's,^modules/,,' -e 's,\.diff$,,')
     fi
   } \
-      | sed -e '/^CVS$/d' -e '/^ChangeLog$/d' -e '/^COPYING$/d' -e '/^README$/d' -e '/^TEMPLATE$/d' -e '/^TEMPLATE-TESTS$/d' -e '/~$/d' \
+      | sed -e '/^CVS$/d' -e '/[/]CVS$/d' \
+            -e '/^ChangeLog$/d' -e '/[/]ChangeLog$/d' \
+            -e '/^COPYING$/d' -e '/[/]COPYING$/d' \
+            -e '/^README$/d' -e '/[/]README$/d' \
+            -e '/^TEMPLATE$/d' \
+            -e '/^TEMPLATE-TESTS$/d' \
+            -e '/~$/d' \
       | sed -e '/-tests$/d' \
       | LC_ALL=C sort -u
 }