diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2010-01-13 14:10:38 +0000 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2010-01-13 14:10:38 +0000 |
commit | 90624a7eb3d37ce6cc28b34b6c6069688a26b203 (patch) | |
tree | 0877c67e2d8256e3b78a1b313de90768110d236f /Dh_Haskell.sh | |
parent | 5e66d1906a050d692447d96a016be9890ea62561 (diff) |
Strip id from package names before passing to ghc-pkg
Diffstat (limited to 'Dh_Haskell.sh')
-rw-r--r-- | Dh_Haskell.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh index 1a820c3..f15dc48 100644 --- a/Dh_Haskell.sh +++ b/Dh_Haskell.sh @@ -1,3 +1,7 @@ +strip_hash(){ + echo "$1" | sed 's/-................................$//' +} + sort_uniq(){ { for i in "$@" ; do @@ -34,7 +38,7 @@ providing_package_for_ghc6(){ local dir local dirs local lib - dep=$1 + 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|' ` for dir in $dirs ; do @@ -52,7 +56,7 @@ providing_package_for_ghc6_prof(){ local dir local dirs local lib - dep=$1 + 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|' ` for dir in $dirs ; do |