diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2003-02-19 23:23:26 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2003-02-19 23:23:26 +0000 |
commit | 05ef03c50662029bfe97a4a461d6338f7b1f2327 (patch) | |
tree | 6d9e60c6a284df0dafc33956f0e277d5e7f2f175 /sys-devel/gcc-config | |
parent | The md5 changed on CMFPlone1.0.1 tarball. Do redoing the digest files. (diff) | |
download | gentoo-2-05ef03c50662029bfe97a4a461d6338f7b1f2327.tar.gz gentoo-2-05ef03c50662029bfe97a4a461d6338f7b1f2327.tar.bz2 gentoo-2-05ef03c50662029bfe97a4a461d6338f7b1f2327.zip |
speed related fixes
Diffstat (limited to 'sys-devel/gcc-config')
-rw-r--r-- | sys-devel/gcc-config/ChangeLog | 6 | ||||
-rw-r--r-- | sys-devel/gcc-config/files/gcc-config-1.3.1 | 30 |
2 files changed, 28 insertions, 8 deletions
diff --git a/sys-devel/gcc-config/ChangeLog b/sys-devel/gcc-config/ChangeLog index 395e0dbc0ecd..5f0e4e976a01 100644 --- a/sys-devel/gcc-config/ChangeLog +++ b/sys-devel/gcc-config/ChangeLog @@ -1,6 +1,6 @@ # ChangeLog for sys-devel/gcc-config # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.26 2003/02/19 21:46:47 zwelch Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.27 2003/02/19 23:23:26 azarah Exp $ 19 Feb 2003; <gmsoft@gneoot.org> gcc-config-1.3.1.ebuild : Changed ~hppa to hppa. @@ -13,6 +13,10 @@ 18 Feb 2003; <seemant@gentoo.org> gcc-config-1.3.1.ebuild : moved to stable for x86 + 19 Feb 2003; Martin Schlemmer <azarah@gentoo.org> gcc-config-1.3.1 : + + Some tweaks to try minimize subshells. + 09 Feb 2003; Guy Martin <gmsoft@gentoo.org> gcc-config-1.2.7.ebuild : Added hppa keyword to gcc-config-1.2.7.ebuild and ~hppa keyword on diff --git a/sys-devel/gcc-config/files/gcc-config-1.3.1 b/sys-devel/gcc-config/files/gcc-config-1.3.1 index 0de0f47bff40..2dc711a72783 100644 --- a/sys-devel/gcc-config/files/gcc-config-1.3.1 +++ b/sys-devel/gcc-config/files/gcc-config-1.3.1 @@ -2,7 +2,7 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Author: Martin Schlemmer <azarah@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.1,v 1.1 2003/01/19 19:14:52 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.1,v 1.2 2003/02/19 23:23:26 azarah Exp $ source /etc/init.d/functions.sh || { @@ -59,21 +59,32 @@ then usage fi +HAVE_WHICH="no" +if [ -n "$(which which 2> /dev/null)" ] +then + HAVE_WHICH="yes" +fi + find_path() { [ -z "$1" ] && return 0 - if [ -n "$(which which 2> /dev/null)" -a -x "$(which $1)" ] + if [ "${HAVE_WHICH}" = "yes" ] then - echo "$(which $1)" - return 0 + local fullpath="$(which $1 2> /dev/null)" + + if [ -x "${fullpath}" ] + then + echo "${fullpath}" + return 0 + fi fi - for x in /bin /sbin /usr/bin /usr/sbin + for x in /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin do if [ -x "${x}/$1" -a -r "${x}/$1" ] then echo "${x}/$1" - break + return 0 fi done @@ -98,7 +109,12 @@ cmd_setup() { } CC_COMP="" -REAL_CHOST="$(/usr/bin/python -c 'import portage; print portage.settings["CHOST"];')" +REAL_CHOST="$(/usr/bin/python -c 'import portage; print portage.settings["CHOST"];' 2> /dev/null)" +if [ -z "${REAL_CHOST}" ] +then + eerror "$0: Could not get portage CHOST!" + return 1 +fi switch_profile() { local MY_LDPATH="" |