summaryrefslogtreecommitdiff
path: root/Dh_Haskell.sh
diff options
context:
space:
mode:
authorSven Bartscher <sven@debconf2016.virtual>2016-07-04 12:10:26 +0200
committerSven Bartscher <sven@debconf2016.virtual>2016-07-04 12:10:26 +0200
commitd04d43d6ea840707c7af7ef2fbac5c8c0e96339d (patch)
tree2afb468034d0a1ea8e680072e98b83f284068532 /Dh_Haskell.sh
parent5fc375c0576d729c21cbba5931aaa415c6278207 (diff)
Extract package hashes by taking everything between the last hyphen
and the end of the package id, so no assumption is made about the length of the package id, except that it is at least one character long.
Diffstat (limited to 'Dh_Haskell.sh')
-rw-r--r--Dh_Haskell.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/Dh_Haskell.sh b/Dh_Haskell.sh
index 824e8be..e969e4b 100644
--- a/Dh_Haskell.sh
+++ b/Dh_Haskell.sh
@@ -104,7 +104,7 @@ hc_hoogle(){
}
strip_hash(){
- echo "$1" | sed 's/-................................$//'
+ echo "$1" | sed 's/-[^-]\+$//'
}
sort_uniq(){
@@ -309,8 +309,8 @@ package_id_to_virtual_package(){
type="$2"
pkgid="$3"
echo ${pkgid} | tr A-Z a-z | \
- grep '[a-z0-9]\+-[0-9\.]\+-................................' | \
- perl -pe 's/([a-z0-9-]+)-([0-9\.]+)-(.....).........................../lib'${hc}'-\1-'$type'-\2-\3/'
+ grep '[a-z0-9]\+-[0-9\.]\+-[^-]\+$' | \
+ perl -pe 's/([a-z0-9-]+)-([0-9\.]+)-([^-]{1,5})[^-]*$/lib'${hc}'-\1-'$type'-\2-\3/'
}
depends_for_hugs(){