summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Loeh <kosmikus@gentoo.org>2004-11-24 15:05:49 +0000
committerAndres Loeh <kosmikus@gentoo.org>2004-11-24 15:05:49 +0000
commitbd83dc8d405e8424943e1852e2bfa8a079e2a315 (patch)
tree5569a16bf4bfc36d937fa80b4672fc00c712639f /eclass/ghc-package.eclass
parentStable on hppa. (Manifest recommit) (diff)
downloadgentoo-2-bd83dc8d405e8424943e1852e2bfa8a079e2a315.tar.gz
gentoo-2-bd83dc8d405e8424943e1852e2bfa8a079e2a315.tar.bz2
gentoo-2-bd83dc8d405e8424943e1852e2bfa8a079e2a315.zip
* check for existence of configuration directory prior to doing
anything in ghc-reregister function
Diffstat (limited to 'eclass/ghc-package.eclass')
-rw-r--r--eclass/ghc-package.eclass16
1 files changed, 9 insertions, 7 deletions
diff --git a/eclass/ghc-package.eclass b/eclass/ghc-package.eclass
index e0754f8d2a60..087b34de0d89 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.4 2004/11/04 14:16:14 kosmikus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.5 2004/11/24 15:05:49 kosmikus Exp $
#
# Author: Andres Loeh <kosmikus@gentoo.org>
#
@@ -101,12 +101,14 @@ ghc-register-pkg() {
ghc-reregister() {
einfo "Re-adding packages ..."
ewarn "This may cause several warnings, but they should be harmless."
- pushd $(ghc-confdir)
- for conf in *.conf; do
- einfo "Processing ${conf} ..."
- ghc-register-pkg ${conf}
- done
- popd
+ if [ -d "$(ghc-confdir)" ]; then
+ pushd $(ghc-confdir)
+ for conf in *.conf; do
+ einfo "Processing ${conf} ..."
+ ghc-register-pkg ${conf}
+ done
+ popd
+ fi
}
# unregisters ...