X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=libraries%2Fgen_contents_index;h=2ae6bf5772211934e3255a07c3e3bab346e29434;hb=d9a2eefd17cd91e7193616d955056fddf3dab305;hp=e189cac8ee3726a0a755988b8f2857e0d887ae5d;hpb=7f4b8d9bfbfb0556d51ba1fb25f18e424bd5bf9c;p=ghc-hetmet.git diff --git a/libraries/gen_contents_index b/libraries/gen_contents_index index e189cac..2ae6bf5 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/.*[ \t]//'` + # 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