Fix another sed problem on Solaris
authorIan Lynagh <igloo@earth.li>
Thu, 17 Dec 2009 00:04:21 +0000 (00:04 +0000)
committerIan Lynagh <igloo@earth.li>
Thu, 17 Dec 2009 00:04:21 +0000 (00:04 +0000)
libraries/gen_contents_index

index 59f59dd..2ae6bf5 100644 (file)
@@ -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