summaryrefslogtreecommitdiff
path: root/libraries/gen_contents_index
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2009-12-17 00:04:21 +0000
committerIan Lynagh <igloo@earth.li>2009-12-17 00:04:21 +0000
commitd9a2eefd17cd91e7193616d955056fddf3dab305 (patch)
tree4eefa2609352e85f87abd7e3b61b359db24c874f /libraries/gen_contents_index
parentd708100212551a1a4c3c05a7830c9092b4498e7c (diff)
downloadhaskell-d9a2eefd17cd91e7193616d955056fddf3dab305.tar.gz
Fix another sed problem on Solaris
Diffstat (limited to 'libraries/gen_contents_index')
-rw-r--r--libraries/gen_contents_index4
1 files changed, 3 insertions, 1 deletions
diff --git a/libraries/gen_contents_index b/libraries/gen_contents_index
index 59f59dd93f..2ae6bf5772 100644
--- a/libraries/gen_contents_index
+++ b/libraries/gen_contents_index
@@ -14,7 +14,9 @@ case $* in
do
LIBPATH=`echo "$HADDOCK_FILE" | sed 's#/dist-install.*##'`
NAME=`echo "$HADDOCK_FILE" | sed 's#.*/##' | sed 's#\.haddock$##'`
- VERSION=`grep -i '^version:' $LIBPATH/$NAME.cabal | sed 's/.*[[:space:]]//'`
+ # It's easier to portably remove tabs with tr and to try to get
+ # sed to do what we want
+ VERSION=`grep -i '^version:' $LIBPATH/$NAME.cabal | sed 's/.*://'` | tr -d ' \t'
HADDOCK_ARG="--read-interface=${NAME}-${VERSION},$HADDOCK_FILE"
HADDOCK_ARGS="$HADDOCK_ARGS $HADDOCK_ARG"
done