Use character class for sed expression instead of \s
authorBen Walton <bdwalton@gmail.com>
Thu, 25 Oct 2012 15:58:19 +0000 (16:58 +0100)
committerJeff King <peff@peff.net>
Fri, 26 Oct 2012 12:38:15 +0000 (08:38 -0400)
Sed on Mac OS X doesn't handle \s in a sed expressions so use a more
portable character set expression instead.

Signed-off-by: Ben Walton <bdwalton@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
t/t9401-git-cvsserver-crlf.sh

index cdb83603144d4956a8bbbc2a307df99c44cf678d..1c5bc84fa72492a820638e4e197b89ba13bc27f1 100755 (executable)
@@ -46,7 +46,7 @@ check_status_options() {
        echo "Error from cvs status: $1 $2" >> "${WORKDIR}/marked.log"
        return 1;
     fi
-    got="$(sed -n -e 's/^\s*Sticky Options:\s*//p' "${WORKDIR}/status.out")"
+    got="$(sed -n -e 's/^[     ]*Sticky Options:[      ]*//p' "${WORKDIR}/status.out")"
     expect="$3"
     if [ x"$expect" = x"" ] ; then
        expect="(none)"