summaryrefslogtreecommitdiff
path: root/Dh_Haskell.sh
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2010-01-14 11:02:57 +0000
committerJoachim Breitner <mail@joachim-breitner.de>2010-01-14 11:02:57 +0000
commit1f71af58f5c815c46d6f0152fef03b4739f25285 (patch)
tree998270f49a0f3eecd1fa37fb34eb4cfe59a5b560 /Dh_Haskell.sh
parent5bf4572b3fbcd00190b6f08e7a06a8b9379d78dc (diff)
More robust handling of ghc-pkg6 output
Diffstat (limited to 'Dh_Haskell.sh')
-rw-r--r--Dh_Haskell.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh
index 415f998..805ba22 100644
--- a/Dh_Haskell.sh
+++ b/Dh_Haskell.sh
@@ -27,8 +27,8 @@ providing_package_for_ghc6(){
local dirs
local lib
dep=`strip_hash $1`
- dirs=`ghc-pkg6 field $dep library-dirs | cut -d':' -f 2`
- lib=`ghc-pkg6 field $dep hs-libraries | sed -e 's|hs-libraries: *\([^ ]*\).*|\1|' `
+ dirs=`ghc-pkg6 field $dep library-dirs | grep -i ^library-dirs | cut -d':' -f 2`
+ lib=`ghc-pkg6 field $dep hs-libraries | grep -i ^hs-libraries | sed -e 's|hs-libraries: *\([^ ]*\).*|\1|' `
for dir in $dirs ; do
if [ -e "${dir}/lib${lib}.a" ] ; then
package=`dpkg-query -S ${dir}/lib${lib}.a | cut -d':' -f 1` || exit $?
@@ -45,8 +45,8 @@ providing_package_for_ghc6_prof(){
local dirs
local lib
dep=`strip_hash $1`
- dirs=`ghc-pkg6 field $dep library-dirs | cut -d':' -f 2`
- lib=`ghc-pkg6 field $dep hs-libraries | sed -e 's|hs-libraries: *\([^ ]*\).*|\1|' `
+ dirs=`ghc-pkg6 field $dep library-dirs | grep -i ^library-dirs | cut -d':' -f 2`
+ lib=`ghc-pkg6 field $dep hs-libraries | grep -i ^hs-libraries | sed -e 's|hs-libraries: *\([^ ]*\).*|\1|' `
for dir in $dirs ; do
if [ -e "${dir}/lib${lib}_p.a" ] ; then
package=`dpkg-query -S ${dir}/lib${lib}_p.a | cut -d':' -f 1` || exit $?