summaryrefslogtreecommitdiff
path: root/tools/read-version
diff options
context:
space:
mode:
authorBen Howard <ben.howard@canonical.com>2013-09-11 14:56:36 -0600
committerBen Howard <ben.howard@canonical.com>2013-09-11 14:56:36 -0600
commit23f7b8a39bb197db557bdcf851639ea4111b7786 (patch)
tree9f1a5501fd1f9c0d4b32b597b09ae19ceaab9ef6 /tools/read-version
parent1979ea3e3440335632af8e7e58dd34aae52a2b96 (diff)
parent6b122985da19c08ea50a25226c726f2982680efb (diff)
downloadvyos-cloud-init-23f7b8a39bb197db557bdcf851639ea4111b7786.tar.gz
vyos-cloud-init-23f7b8a39bb197db557bdcf851639ea4111b7786.zip
Merged in upstream changes with disk partition support
Diffstat (limited to 'tools/read-version')
-rwxr-xr-xtools/read-version5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/read-version b/tools/read-version
index c37228f8..3df0889b 100755
--- a/tools/read-version
+++ b/tools/read-version
@@ -25,7 +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"