Remove trailing / in pathname.

From Alan Barrett. See tech-toolchain@ for related discussion.
This commit is contained in:
junyoung 2004-08-17 14:00:30 +00:00
parent 9f8ea6c0fb
commit 0220a8417b
1 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,5 @@
#! /usr/bin/env sh
# $NetBSD: build.sh,v 1.130 2004/07/02 04:25:24 jmc Exp $
# $NetBSD: build.sh,v 1.131 2004/08/17 14:00:30 junyoung Exp $
#
# Copyright (c) 2001-2004 The NetBSD Foundation, Inc.
# All rights reserved.
@ -335,13 +335,18 @@ unsetmakeenv()
makeenv="${makeenv} $1"
}
# Convert possibly-relative path to absolute path by prepending
# ${TOP} if necessary. Also delete trailing "/", if any.
resolvepath()
{
case "${OPTARG}" in
/)
;;
/*)
OPTARG="${OPTARG%/}"
;;
*)
OPTARG="${TOP}/${OPTARG}"
OPTARG="${TOP}/${OPTARG%/}"
;;
esac
}
@ -856,7 +861,7 @@ createmakewrapper()
eval cat <<EOF ${makewrapout}
#! /bin/sh
# Set proper variables to allow easy "make" building of a NetBSD subtree.
# Generated from: \$NetBSD: build.sh,v 1.130 2004/07/02 04:25:24 jmc Exp $
# Generated from: \$NetBSD: build.sh,v 1.131 2004/08/17 14:00:30 junyoung Exp $
# with these arguments: ${_args}
#
EOF