[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
update bootstrap from gnulib; tweak cp doc
From: |
Jim Meyering |
Subject: |
update bootstrap from gnulib; tweak cp doc |
Date: |
Sun, 30 Aug 2009 12:05:29 +0200 |
FYI, two minor adjustments:
>From a10ba58f3cabfe316b714c476bceafe36059fd7b Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 29 Aug 2009 22:18:28 +0200
Subject: [PATCH 1/2] build: update bootstrap from gnulib
* bootstrap: Merge from gnulib.
---
bootstrap | 39 +++++++++++++++++++++++++++++++++++----
1 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/bootstrap b/bootstrap
index 1f1bc4a..4be24b6 100755
--- a/bootstrap
+++ b/bootstrap
@@ -34,7 +34,7 @@ bt_regex=`echo "$bt"| sed 's/\./[.]/g'`
bt2=${bt}2
usage() {
- echo >&2 "\
+ cat <<EOF
Usage: $0 [OPTION]...
Bootstrap this package from the checked-out sources.
@@ -56,7 +56,7 @@ For build prerequisites, environment variables like
\$AUTOCONF and \$AMTAR
are honored.
Running without arguments will suffice in most cases.
-"
+EOF
}
# Configuration.
@@ -148,6 +148,37 @@ copy=false
# on which version control system (if any) is used in the source directory.
vc_ignore=auto
+# find_tool ENVVAR NAMES...
+# -------------------------
+find_tool ()
+{
+ # Find sha1sum, named gsha1sum on MacPorts.
+ find_tool_envvar=$1
+ shift
+ if eval test x"\$$find_tool_envvar" = x; then
+ for i
+ do
+ if ($i --version </dev/null) >/dev/null 2>&1; then
+ find_tool_res=$i
+ break
+ fi
+ done
+ fi
+ if test x"$find_tool_res" = x; then
+ echo >&2 "$0: $find_tool_name is required"
+ exit 1
+ fi
+ ($find_tool_res --version </dev/null) >/dev/null 2>&1 || {
+ echo >&2 "$0: cannot run $find_tool_res --version"
+ exit 1
+ }
+ eval "$find_tool_envvar=\"$find_tool_res\""
+ eval "export $find_tool_envvar"
+}
+
+# Find sha1sum, named gsha1sum on MacPorts.
+find_tool SHA1SUM sha1sum gsha1sum
+
# Override the default configuration, if necessary.
# Make sure that bootstrap.conf is sourced from the current directory
# if we were invoked as "sh bootstrap".
@@ -420,11 +451,11 @@ update_po_files() {
cksum_file="$ref_po_dir/$po.s1"
if ! test -f "$cksum_file" ||
! test -f "$po_dir/$po.po" ||
- ! ${SHA1SUM-sha1sum} -c --status "$cksum_file" \
+ ! $SHA1SUM -c --status "$cksum_file" \
< "$new_po" > /dev/null; then
echo "updated $po_dir/$po.po..."
cp "$new_po" "$po_dir/$po.po" \
- && ${SHA1SUM-sha1sum} < "$new_po" > "$cksum_file"
+ && $SHA1SUM < "$new_po" > "$cksum_file"
fi
done
}
--
1.6.4.2.363.g2d6e
>From e3ccc324d32f41727cf9b26ce50330e1f24a1385 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 29 Aug 2009 22:56:48 +0200
Subject: [PATCH 2/2] doc: cp: update note on preserving symlink time stamps
* doc/coreutils.texi (cp invocation): Now, we *do* preserve time
stamps on symlinks, when possible.
---
doc/coreutils.texi | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index f4be2c2..33877af 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -7445,12 +7445,10 @@ cp invocation
a member of the desired group.
@itemx timestamps
Preserve the times of last access and last modification, when possible.
-In general, it is not possible to preserve these attributes
+On older systems, it is not possible to preserve these attributes
when the affected file is a symbolic link.
-However, FreeBSD now provides the @code{lutimes} function, which makes
-it possible even for symbolic links. However, this implementation does
-not yet take advantage of that.
address@hidden FIXME: once we provide lutimes support, update the above.
+However, many systems now provide the @code{utimensat} function,
+which makes it possible even for symbolic links.
@itemx links
Preserve in the destination files
any links between corresponding source files.
--
1.6.4.2.363.g2d6e
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- update bootstrap from gnulib; tweak cp doc,
Jim Meyering <=