Add some checks on overlay.mk

This commit is contained in:
Pierre-Hugues Husson 2018-12-12 23:50:17 +01:00
parent 7fed6c5d50
commit 97e3e0f32f

View file

@ -65,4 +65,19 @@ rm -f tests/priorities
# fail $f "File is DOS type"
#done
#Check overlay.mk
(
sorted="$(tail -n +2 overlay.mk |grep -E treble- | LC_ALL=C sort -s | md5sum)"
unsorted="$(tail -n +2 overlay.mk |grep -E treble- | md5sum)"
if [ "$sorted" != "$unsorted" ];then
fail overlay.mk "Keep entries sorted"
fi
if grep -E '.+' overlay.mk |grep -qvE '\\$';then
fail overlay.mk "Keep the \\ at the end of all non-empty lines"
fi
if [ "$(tail -n 1 overlay.mk)" != "" ];then
fail overlay.mk "Keep the empty line at the end"
fi
)
if [ -f fail ];then exit 1; fi