summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2007-01-26 15:48:42 +0000
committerrillig <rillig@pkgsrc.org>2007-01-26 15:48:42 +0000
commit262f062106696a87dba0ac43615d330560c9ea42 (patch)
treeefa333ee809c5e80e55b6467e5780636183e14ee /bootstrap
parent0a87862dc5bccd86643e6e618fe19fecad86f590 (diff)
downloadpkgsrc-262f062106696a87dba0ac43615d330560c9ea42.tar.gz
Added a fix for the case when /bin/sh is a (symlink to) dash.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap/bootstrap9
1 files changed, 8 insertions, 1 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap
index 0cfebb5aa6a..20de6f1fa88 100755
--- a/bootstrap/bootstrap
+++ b/bootstrap/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: bootstrap,v 1.89 2007/01/26 07:57:04 rillig Exp $
+# $NetBSD: bootstrap,v 1.90 2007/01/26 15:48:42 rillig Exp $
#
#
# Copyright (c) 2001-2002 Alistair G. Crooks. All rights reserved.
@@ -853,6 +853,13 @@ echo_msg "Installing pkgtools"
copy_src $pkgsrcdir/pkgtools/pkg_install/files pkg_install
run_cmd "(cd $wrkdir/pkg_install; env $BSTRAP_ENV CPPFLAGS='$CPPFLAGS -I../libnbcompat -I../../libnbcompat' LDFLAGS='$LDFLAGS -L../libnbcompat -L../../libnbcompat' LIBS='-lnbcompat' $shprog ./configure $configure_quiet_flags -C --prefix=$prefix --sysconfdir=$sysconfdir --with-pkgdbdir=$pkgdbdir --mandir=$mandir $pkg_install_args && $bmake && $bmake install)"
+# On some newer Ubuntu installations, /bin/sh is a symlink to /bin/dash,
+# whose echo(1) is not POSIX-compliant.
+dash_echo_test=`echo "\\100"`
+if [ "$dash_echo_test" = "@" ]; then
+ echo "TOOLS_PLATFORM.sh?= /bin/bash # instead of /bin/sh" >> ${MKCONF_EXAMPLE}
+fi
+
# preserve compiler and tool environment variables settings
test -z "$CP" || echo "TOOLS_PLATFORM.cp?= $CP" >> ${MKCONF_EXAMPLE}
test -z "$GREP" || echo "TOOLS_PLATFORM.grep?= $GREP" >> ${MKCONF_EXAMPLE}