summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-02-20 15:18:16 +0000
committerMike Frysinger <vapier@gentoo.org>2007-02-20 15:18:16 +0000
commita06d34bf9a546b8d8eb7440edb085f0ded6e66ee (patch)
tree4339c6e6fa15977879725d326bb3285e015044c5 /sys-devel/binutils-config
parentx86 stable wrt bug 167688 (diff)
downloadgentoo-2-a06d34bf9a546b8d8eb7440edb085f0ded6e66ee.tar.gz
gentoo-2-a06d34bf9a546b8d8eb7440edb085f0ded6e66ee.tar.bz2
gentoo-2-a06d34bf9a546b8d8eb7440edb085f0ded6e66ee.zip
tweak ROOT handling slightly to work with relative paths
(Portage version: 2.1.2-r9)
Diffstat (limited to 'sys-devel/binutils-config')
-rwxr-xr-xsys-devel/binutils-config/files/binutils-config-1.912
1 files changed, 7 insertions, 5 deletions
diff --git a/sys-devel/binutils-config/files/binutils-config-1.9 b/sys-devel/binutils-config/files/binutils-config-1.9
index a7659d157b5d..d77e364a9759 100755
--- a/sys-devel/binutils-config/files/binutils-config-1.9
+++ b/sys-devel/binutils-config/files/binutils-config-1.9
@@ -1,12 +1,16 @@
#!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-1.9,v 1.6 2006/11/26 13:40:14 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-1.9,v 1.7 2007/02/20 15:18:16 vapier Exp $
# Format of /etc/env.d/binutils/:
# config-TARGET: CURRENT=version for TARGET
# TARGET-VER: has a TARGET and VER variable
+[[ -z ${ROOT} ]] && ROOT="/"
+[[ ${ROOT} != */ ]] && ROOT="${ROOT}/"
+[[ ${ROOT} != /* ]] && ROOT="${PWD}${ROOT}"
+
cd /
trap ":" INT QUIT TSTP
@@ -289,8 +293,6 @@ set_HOST() {
fi
}
-[[ -z ${ROOT} ]] && ROOT="/"
-[[ ${ROOT:0-1} != "/" ]] && ROOT="${ROOT}/"
ENV_D="${ROOT}etc/env.d/binutils"
DEBUG="no"
@@ -332,7 +334,7 @@ while [[ $# -gt 0 ]] ; do
exit 0
;;
-V|--version)
- cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-1.9,v 1.6 2006/11/26 13:40:14 vapier Exp $"
+ cvsver="$Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/binutils-config-1.9,v 1.7 2007/02/20 15:18:16 vapier Exp $"
cvsver=${cvsver##*binutils-config-}
bver=${cvsver%%,v *}
cvsver=${cvsver#* }