summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@chromium.org>2017-09-23 05:35:08 -0400
committerchrome-bot <chrome-bot@chromium.org>2017-09-26 13:36:09 -0700
commitb613faf5cd4359db719e7349148a94af4c50e342 (patch)
tree5683c61cebb84c92ba8b18a490be8b08b51b87b5
parent6d301ca142846f54d55b75b1c77439ce2c25835e (diff)
downloadvboot-b613faf5cd4359db719e7349148a94af4c50e342.tar.gz
image_signing: allow lsb-release to contain comments
Nothing needs this, just something I noticed while debugging. BUG=None TEST=`ensure_sane_lsb-release.sh` no longer complains about comment lines BRANCH=None Change-Id: Ia39e6461db79a387cc59e5f88ec1216984bb4d28 Reviewed-on: https://chromium-review.googlesource.com/680058 Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org>
-rwxr-xr-xscripts/image_signing/ensure_sane_lsb-release.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/image_signing/ensure_sane_lsb-release.sh b/scripts/image_signing/ensure_sane_lsb-release.sh
index 9e5a179d..4d958b34 100755
--- a/scripts/image_signing/ensure_sane_lsb-release.sh
+++ b/scripts/image_signing/ensure_sane_lsb-release.sh
@@ -74,7 +74,10 @@ lsb_syntaxcheck() {
# Also checks for = with no spaces on either side.
# Checks that the value contains printables (and not starting with space).
# Alternatively, the value is permitted to be empty (0 chars) too.
- badlines=$(grep -Ev '^[A-Z][A-Z_]*=([[:graph:]][[:print:]]*)?$' "$lsbfile")
+ # Allow comments to start with #.
+ badlines=$(grep -Ev \
+ -e '^[A-Z][A-Z_]*=([[:graph:]][[:print:]]*)?$' \
+ -e '^[[:space:]]*#' "${lsbfile}")
if [ -n "$badlines" ]; then
syntaxbad=1
error "${lsbfile}: Some lines seem non-well-formed:"