fix read-version

This commit is contained in:
Scott Moser 2013-09-11 16:58:01 -04:00
parent 949fb98df7
commit d32f04d0c7

View File

@ -25,8 +25,8 @@ if [ ! -e "$CHNG_LOG" ]; then
fail "Unable to find 'ChangeLog' file located at '$CHNG_LOG'"
fi
VERSION=$(sed -n '/^[0-9]\+[.][0-9]\+[.][0-9]\+:/ \
{s/://; p; :a;n; ba; }' "$CHNG_LOG") &&
VERSION=$(sed -n '/^[0-9]\+[.][0-9]\+[.][0-9]\+:/ {s/://; p; :a;n; ba; }' \
"$CHNG_LOG") &&
[ -n "$VERSION" ] ||
fail "failed to get version from '$CHNG_LOG'"
echo "$VERSION"