* bootstrap (slurp): Work even in environments where "ls" defaults
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 21 Jul 2007 13:00:54 +0000 (15:00 +0200)
committerJim Meyering <jim@meyering.net>
Sat, 21 Jul 2007 13:00:54 +0000 (15:00 +0200)
to "ls -A".  Put in a FIXME, though, since the current code does
not slurp files whose names start with ".", and this looks like
it might be a troublesome area.

ChangeLog
bootstrap

index c7ba831..3b144b3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-07-21  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * bootstrap (slurp): Work even in environments where "ls" defaults
+       to "ls -A".  Put in a FIXME, though, since the current code does
+       not slurp files whose names start with ".", and this looks like
+       it might be a troublesome area.
+
 2007-07-20  Jim Meyering  <jim@meyering.net>
 
        Document and add a test for today's sort bug fix.
index 442309c..bad0cbe 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -391,7 +391,11 @@ slurp() {
   for dir in . `(cd $1 && find * -type d -print)`; do
     copied=
     sep=
-    for file in `ls $1/$dir`; do
+    for file in `ls -a $1/$dir`; do
+      case $file in
+      .|..) continue;;
+      .*) continue;; # FIXME: should all file names starting with "." be ignored?
+      esac
       test -d $1/$dir/$file && continue
       for excluded_file in $excluded_files; do
        test "$dir/$file" = "$excluded_file" && continue 2