summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg>2010-11-13 21:43:39 +0000
committerjoerg <joerg>2010-11-13 21:43:39 +0000
commit4257b5eb334ef572a03c99b9ee703b616ca61fbb (patch)
treeded01cbe5991f43636ec9008d7e46289024ba719
parent9efd00a2dad42da9a0de74388b246ffcdefef65c (diff)
downloadpkgsrc-4257b5eb334ef572a03c99b9ee703b616ca61fbb.tar.gz
Bailout if the SH override is not a full path.
-rwxr-xr-xbootstrap/bootstrap11
1 files changed, 10 insertions, 1 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap
index 892bd38520f..39cb9d3b735 100755
--- a/bootstrap/bootstrap
+++ b/bootstrap/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: bootstrap,v 1.159 2010/08/30 06:21:49 obache Exp $
+# $NetBSD: bootstrap,v 1.160 2010/11/13 21:43:39 joerg Exp $
#
#
# Copyright (c) 2001-2002 Alistair G. Crooks. All rights reserved.
@@ -335,6 +335,15 @@ checkarg_sane_relative_path() {
bootstrap_sh=${SH-/bin/sh}
bootstrap_sh_set=${SH+set}
+case "$bootstrap_sh" in
+/*)
+ ;;
+*)
+ echo "ERROR: The variable SH must contain an absolute path" 1>&2
+ exit 1
+ ;;
+esac
+
# On some newer Ubuntu installations, /bin/sh is a symlink to /bin/dash,
# whose echo(1) is not BSD-compatible.
dash_echo_test=`$bootstrap_sh -c 'echo "\\100"'`