Use character class for sed expression instead of \s

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>
This commit is contained in:
Ben Walton 2012-10-25 16:58:19 +01:00 committed by Jeff King
parent abd66f2207
commit db7fde9cae

View File

@ -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)"