From e746baefadd23589dbb2cd03ea77cf31cd5f3f6c Mon Sep 17 00:00:00 2001 From: apb Date: Sat, 3 Jan 2009 08:23:00 +0000 Subject: [PATCH] "\t" does not represent a tab in sed regular expressions, so use a ${tab} variable instead. This bug was found by Jeremy C. Reed. --- build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index b5aaee8f7e4e..5d6298c08621 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.199 2008/11/13 20:40:11 apb Exp $ +# $NetBSD: build.sh,v 1.200 2009/01/03 08:23:00 apb Exp $ # # Copyright (c) 2001-2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -43,6 +43,7 @@ progname=${0##*/} toppid=$$ results=/dev/null +tab=' ' trap "exit 1" 1 2 3 15 bomb() @@ -113,7 +114,7 @@ set_HOST_SH() # specifying HOST_SH in the environment. # [ -z "${HOST_SH}" ] && HOST_SH="$( - (ps -p $$ -o comm | sed -ne '2s/[ \t]*$//p') 2>/dev/null )" + (ps -p $$ -o comm | sed -ne "2s/[ ${tab}]*\$//p") 2>/dev/null )" # If nothing above worked, use "sh". We will later find the # first directory in the PATH that has a "sh" program. @@ -1201,7 +1202,7 @@ createmakewrapper() eval cat <