diff options
author | joerg <joerg@pkgsrc.org> | 2010-11-13 21:43:39 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2010-11-13 21:43:39 +0000 |
commit | 8af46e3f404e6ac1ec37547d3919319cf5ea3a4d (patch) | |
tree | ded01cbe5991f43636ec9008d7e46289024ba719 /bootstrap | |
parent | 309ff161bace6cfec44cca1cdc4ba2602996425f (diff) | |
download | pkgsrc-8af46e3f404e6ac1ec37547d3919319cf5ea3a4d.tar.gz |
Bailout if the SH override is not a full path.
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap/bootstrap | 11 |
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"'` |