[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCHv2] bootstrap: avoid broken Solaris sed
From: |
Eric Blake |
Subject: |
[PATCHv2] bootstrap: avoid broken Solaris sed |
Date: |
Sat, 13 Nov 2010 16:47:15 -0700 |
* build-aux/bootstrap (SED): Filter out bad sed.
(sed): New function if $SED is needed.
Reported by Ralf Wildenhues, and using idea from Bruno Haible.
Signed-off-by: Eric Blake <address@hidden>
---
> Instead of changing every use of sed to $SED, why don't you define 'sed'
> as a function?
Nice idea; here's v2 of the patch.
ChangeLog | 7 +++++++
build-aux/bootstrap | 23 ++++++++++++++++++++++-
2 files changed, 29 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e2bd35c..90c26f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-11-13 Eric Blake <address@hidden>
+
+ bootstrap: avoid broken Solaris sed
+ * build-aux/bootstrap (SED): Filter out bad sed.
+ (sed): New function if $SED is needed.
+ Reported by Ralf Wildenhues, and using idea from Bruno Haible.
+
2010-11-13 Bruno Haible <address@hidden>
rename test: Add comments.
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index 6c311c3..8e10fdd 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
# Print a version string.
-scriptversion=2010-11-12.21; # UTC
+scriptversion=2010-11-13.23; # UTC
# Bootstrap this package from checked-out sources.
@@ -38,6 +38,27 @@ export LC_ALL
local_gl_dir=gl
+# Find a working sed; Solaris /bin/sed is too weak for some of our uses.
+if test "x$SED" = x; then
+ case `(echo a | gsed -n 1p) 2>/dev/null || echo b | sed -n '/\(b\)*/p'` in
+ a) SED=gsed;;
+ b) SED=sed;;
+ *)
+ if test -x /usr/xpg4/bin/sed; then
+ SED=/usr/xpg4/bin/sed
+ else
+ echo "$0: could not find decent value for \$SED" >&2
+ exit 1
+ fi;;
+ esac
+fi
+if test "x$SED" != xsed; then
+ sed ()
+ {
+ $SED "$@"
+ }
+fi
+
# Temporary directory names.
bt='._bootmp'
bt_regex=`echo "$bt"| sed 's/\./[.]/g'`
--
1.7.3.2
- Re: [libvirt] boostrap: gzip version check problem on FreeBSD, Eric Blake, 2010/11/12
- Re: [libvirt] boostrap: gzip version check problem on FreeBSD, Paul Eggert, 2010/11/12
- Re: [libvirt] boostrap: gzip version check problem on FreeBSD, Eric Blake, 2010/11/12
- Re: [libvirt] boostrap: gzip version check problem on FreeBSD, Ralf Wildenhues, 2010/11/13
- Re: [libvirt] boostrap: gzip version check problem on FreeBSD, Eric Blake, 2010/11/13
- [PATCH] bootstrap: avoid broken Solaris sed, Eric Blake, 2010/11/13
- Re: [PATCH] bootstrap: avoid broken Solaris sed, Bruno Haible, 2010/11/13
- [PATCHv2] bootstrap: avoid broken Solaris sed,
Eric Blake <=
- Re: [PATCH] bootstrap: avoid broken Solaris sed, Eric Blake, 2010/11/13
- Re: [PATCH] bootstrap: avoid broken Solaris sed, Paul Eggert, 2010/11/13
- Re: [PATCH] bootstrap: avoid broken Solaris sed, Bruno Haible, 2010/11/13
- Re: [PATCH] bootstrap: avoid broken Solaris sed, Paul Eggert, 2010/11/14
- Re: [PATCH] bootstrap: avoid broken Solaris sed, Eric Blake, 2010/11/15
- Re: [PATCH] bootstrap: avoid broken Solaris sed, Paul Eggert, 2010/11/15