Merge "dib-lint: ignore blank lines in element ordering"

This commit is contained in:
Jenkins 2015-11-10 00:32:04 +00:00 committed by Gerrit Code Review
commit 3412ced2f0
1 changed files with 2 additions and 1 deletions

View File

@ -96,10 +96,11 @@ for i in $(find elements -type f \
if [ $(basename $i) = "element-deps" ]; then
UNSORTED=${TMPDIR}/element-deps.unsorted
SORTED=${TMPDIR}/element-deps.sorted
grep -v '^#' $i > ${UNSORTED}
grep -v -e '^#' -e '^$' $i > ${UNSORTED}
sort ${UNSORTED} > ${SORTED}
if [ -n "$(diff -c ${UNSORTED} ${SORTED})" ]; then
error "$i is not sorted alphabetically"
diff -y ${UNSORTED} ${SORTED}
fi
fi