bug-gnulib
[Top][All Lists]
Advanced

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

make it possible to avoid symlinks in coreutils' bootstrap


From: Bruno Haible
Subject: make it possible to avoid symlinks in coreutils' bootstrap
Date: Mon, 9 Oct 2006 14:37:26 +0200
User-agent: KMail/1.9.1

Hi Paul,

The fact that coreutils' bootstrap script creates symlinks can be an
annoyance:
  - Creating self-contained tarballs requires extra effort.
  - On my systems, I have a date as part of the gnulib directory name,
    and rename it each time I update. In such a situation, the symlinks
    break often.

Would you mind adding a --copy option to the bootstrap script? Roughly
like this?

Bruno


*** bootstrap.bak       2006-10-08 14:18:02.000000000 +0200
--- bootstrap   2006-10-08 14:21:50.000000000 +0200
***************
*** 40,45 ****
--- 40,46 ----
                            have gnulib sources on your machine, and
                            do not want to waste your bandwidth dowloading
                            them again.
+  --copy                   Copy files instead of creating symbolic links.
   --force                  Bootstrap even if the sources didn't come from CVS.
   --skip-po                Do not download po files.
   --cvs-user=USERNAME      Set the CVS username to be used when accessing
***************
*** 112,117 ****
--- 113,121 ----
  # the distributed version.
  CVS_only_file=CVS
  
+ # Whether to try symlinks before attempting a plain copy.
+ try_ln_s=:
+ 
  # Override the default configuration, if necessary.
  test -r bootstrap.conf && . ./bootstrap.conf
  
***************
*** 133,138 ****
--- 137,144 ----
      SKIP_PO=t;;
    --force)
      CVS_only_file=;;
+   --copy)
+     try_ln_s=false;;
    *)
      echo >&2 "$0: $option: unknown option"
      exit 1;;
***************
*** 300,307 ****
      src_ls=`ls -diL "$src" 2>/dev/null` && set $src_ls && src_i=$1 &&
      dst_ls=`ls -diL "$dst" 2>/dev/null` && set $dst_ls && dst_i=$1 &&
      test "$src_i" = "$dst_i" || {
!       echo "$0: ln -fs $reldir $dst" &&
!       ln -fs "$reldir" "$dst"
      }
    }
  }
--- 306,318 ----
      src_ls=`ls -diL "$src" 2>/dev/null` && set $src_ls && src_i=$1 &&
      dst_ls=`ls -diL "$dst" 2>/dev/null` && set $dst_ls && dst_i=$1 &&
      test "$src_i" = "$dst_i" || {
!       ( $try_ln_s &&
!         ln -fs "$reldir" "$dst" &&
!         echo "$0: ln -fs $reldir $dst"
!       ) 2>/dev/null ||
!       { echo "$0: cp -f $src $dst"
!         cp -f "$src" "$dst"
!       }
      }
    }
  }




reply via email to

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