From 4f0d8b64cce0a0aec3f9fbf4cb179ad362efaf4e Mon Sep 17 00:00:00 2001 From: Andres Loeh Date: Tue, 13 Mar 2007 12:02:04 +0000 Subject: [PATCH] replaced "which" by "type -P" --- eclass/ghc-package.eclass | 6 +++--- eclass/haskell-cabal.eclass | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eclass/ghc-package.eclass b/eclass/ghc-package.eclass index 1aa4db011dd3..cdc3da120cc6 100644 --- a/eclass/ghc-package.eclass +++ b/eclass/ghc-package.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.21 2007/03/11 15:53:31 kolmodin Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.22 2007/03/13 12:02:04 kosmikus Exp $ # # Author: Andres Loeh # Maintained by: Haskell herd @@ -16,12 +16,12 @@ PATH="/usr/bin:/opt/ghc/bin:${PATH}" # for later configuration using environment variables/ # returns the name of the ghc executable ghc-getghc() { - echo "$(which ghc)" + type -P ghc } # returns the name of the ghc-pkg executable ghc-getghcpkg() { - echo "$(which ghc-pkg)" + type -P ghc-pkg } # returns the name of the ghc-pkg binary (ghc-pkg diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass index 3996a1213542..8826a03bffca 100644 --- a/eclass/haskell-cabal.eclass +++ b/eclass/haskell-cabal.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.9 2007/01/15 13:58:13 kosmikus Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.10 2007/03/13 12:02:04 kosmikus Exp $ # # Original authors: Andres Loeh # Duncan Coutts @@ -173,7 +173,7 @@ cabal-pkg() { local err if [[ -n ${CABAL_HAS_LIBRARIES} ]]; then - sed -i "s|$(ghc-getghcpkg)|$(which true)|" .setup-config + sed -i "s|$(ghc-getghcpkg)|$(type -P true)|" .setup-config ./setup register || die "setup register failed" if [[ -f .installed-pkg-config ]]; then ghc-setup-pkg .installed-pkg-config -- 2.26.2