bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FYI: bootstrap dangling symlink tweaks


From: Jim Meyering
Subject: Re: FYI: bootstrap dangling symlink tweaks
Date: Tue, 01 Apr 2008 21:30:48 +0200

Eric Blake <address@hidden> wrote:

> According to Jim Meyering on 4/1/2008 9:25 AM:
> | The first is because I found a few persistent dangling symlinks
> | in lib/*.[ch] to be annoying.
>
> | +find "$m4_base" "$source_base" \
> | +  -name '*.m4' -depth -type l -xtype l -delete > /dev/null 2>&1
>
> Except that doesn't delete dangling links in lib/*.[ch].
>
> You need something like:
>
> find "$m4_base" "$source_base" -depth \
> ~  \( -name '*.m4' -o -name '*.[ch]' \) -type l -xtype l -delete

Thanks.
Here's what I'll probably use:

        bootstrap: remove dangling *.[ch] symlinks from lib
        * bootstrap [dangling symlink removal]: Match *.[ch] files, too.
        Suggestion from Eric Blake.

diff --git a/bootstrap b/bootstrap
index 94d8921..1274af2 100755
--- a/bootstrap
+++ b/bootstrap
@@ -549,8 +549,8 @@ if test -f $mam_template; then
   done
 fi

-# Remove any dangling symlink matching "*.m4" in the gnulib-populated
-# $m4_base directory, since such a file would cause aclocal to fail.
+# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
+# gnulib-populated directories.  Such .m4 files would cause aclocal to fail.
 # The following requires GNU find 4.2.3 or newer.  Considering the usual
 # portability constraints of this script, that may seem a very demanding
 # requirement, but it should be ok.  Ignore any failure, which is fine,
@@ -558,7 +558,8 @@ fi
 # unusual case in which a symlinked-to .m4 file is git-removed from gnulib
 # between successive runs of this script.
 find "$m4_base" "$source_base" \
-  -depth -name '*.m4' -type l -xtype l -delete > /dev/null 2>&1
+  -depth \( -name '*.m4' -o -name '*.[ch]' \) \
+  -type l -xtype l -delete > /dev/null 2>&1


 # Reconfigure, getting other files.
--
1.5.5.rc2.7.g0b2fe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]