From d9a2eefd17cd91e7193616d955056fddf3dab305 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Thu, 17 Dec 2009 00:04:21 +0000 Subject: [PATCH] Fix another sed problem on Solaris --- libraries/gen_contents_index | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/gen_contents_index b/libraries/gen_contents_index index 59f59dd..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/.*[[: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 -- 1.7.10.4