diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2017-12-16 00:35:00 +0100 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2017-12-16 00:35:00 +0100 |
commit | 8ed7dcbd50f64bac03db6b3766ed76963e14f59c (patch) | |
tree | cda94d45beec2fe8d58c35a5d81431f56bf0545d | |
parent | Version 1.2 (diff) | |
download | binutils-config-8ed7dcbd50f64bac03db6b3766ed76963e14f59c.tar.gz binutils-config-8ed7dcbd50f64bac03db6b3766ed76963e14f59c.tar.bz2 binutils-config-8ed7dcbd50f64bac03db6b3766ed76963e14f59c.zip |
Version 1.3
https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-devel/binutils-config/files/binutils-config-1.3?revision=1.1
-rw-r--r-- | binutils-config | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/binutils-config b/binutils-config index e9ab57b..bd80b06 100644 --- a/binutils-config +++ b/binutils-config @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/Attic/binutils-config-1.2,v 1.1 2004/12/15 17:00:30 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils-config/files/Attic/binutils-config-1.3,v 1.1 2004/12/16 02:30:56 vapier Exp $ # Format of /etc/env.d/binutils/: # config-TARGET: CURRENT=version for TARGET @@ -33,7 +33,16 @@ USAGE_END [[ $# -lt 1 ]] && usage && exit 1 switch_profile() { + unset TARGET VER LIBPATH source "${ENV_D}/${PROFILE}" + if [[ -z ${TARGET} ]] ; then + eerror "${PROFILE} is invalid (no \$TARGET defined) :(" + return 1 + fi + if [[ -z ${VER} ]] ; then + eerror "${PROFILE} is invalid (no \$VER defined) :(" + return 1 + fi ebegin "Switching to ${PROFILE}" @@ -54,7 +63,7 @@ switch_profile() { # # Generate library / ldscripts symlinks # - LIBPATH="/usr/lib/binutils/${TARGET}/${VER}" + LIBPATH="${LIBPATH:-/usr/lib/binutils/${TARGET}/${VER}}" cd "${ROOT}/${LIBPATH}" || exit 1 mkdir -p "${ROOT}"/usr/${TARGET}/lib if [[ -d ${ROOT}/usr/${TARGET}/lib/ldscripts ]] ; then |