Fix lint-stable checkin hooks on MacOS X
- wc adds a number of leading spaces which broke cut - sed can't replace spaces with new lines, so use tr for that. - make sure directories are created if they're not there. Change-Id: Ia0db059683abe3d97b0ab6feaece660a1f4e5079 Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: http://review.coreboot.org/774 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins)
This commit is contained in:
parent
0a50084e4d
commit
8ebd11eab9
|
@ -225,7 +225,7 @@ lint lint-stable:
|
||||||
grep "^# DESCR:" $$script | sed "s,.*DESCR: *,," ; \
|
grep "^# DESCR:" $$script | sed "s,.*DESCR: *,," ; \
|
||||||
echo ========; \
|
echo ========; \
|
||||||
$$script > $$LINTLOG; \
|
$$script > $$LINTLOG; \
|
||||||
if [ `wc -l $$LINTLOG | cut -d' ' -f1` -eq 0 ]; then \
|
if [ `echo $$( wc -l $$LINTLOG ) | cut -d' ' -f1` -eq 0 ]; then \
|
||||||
printf "success\n\n"; \
|
printf "success\n\n"; \
|
||||||
else \
|
else \
|
||||||
echo test failed: ; \
|
echo test failed: ; \
|
||||||
|
|
|
@ -33,7 +33,7 @@ fi
|
||||||
|
|
||||||
# $1: object directory
|
# $1: object directory
|
||||||
run_printall() {
|
run_printall() {
|
||||||
$MAKE CONFIG_CCACHE=n CONFIG_SCANBUILD_ENABLE=n NOMKDIR=1 DOTCONFIG=$TMPCONFIG obj=$1 printall |sed -e "s,^ *,," -e "s, ,\n,g" -e "s,^ramstage-objs:=,," -e "s,mainboard/[^/]*/[^/]*/,.../," |grep "/static.*\.[co]" |sort |tr '\012\015' ' ' |sed -e "s, *, ,g" -e "s, *$,,"
|
$MAKE CONFIG_CCACHE=n CONFIG_SCANBUILD_ENABLE=n NOMKDIR=1 DOTCONFIG=$TMPCONFIG obj=$1 printall |sed -e "s,^ *,," -e "s,^ramstage-objs:=,," -e "s,mainboard/[^/]*/[^/]*/,.../," |tr " " "\n"|grep "/static.*\.[co]" |sort |tr '\012\015' ' ' |sed -e "s, *, ,g" -e "s, *$,,"
|
||||||
}
|
}
|
||||||
|
|
||||||
# find GNU make
|
# find GNU make
|
||||||
|
@ -49,7 +49,7 @@ fi
|
||||||
# prepare a config to use
|
# prepare a config to use
|
||||||
TMPCONFIG=`mktemp .tmpconfig.XXXXXX`
|
TMPCONFIG=`mktemp .tmpconfig.XXXXXX`
|
||||||
rm -f $TMPCONFIG
|
rm -f $TMPCONFIG
|
||||||
$MAKE NOMKDIR=1 DOTCONFIG=$TMPCONFIG allyesconfig >/dev/null
|
$MAKE DOTCONFIG=$TMPCONFIG allyesconfig >/dev/null
|
||||||
|
|
||||||
# look up parent directory
|
# look up parent directory
|
||||||
PARENTDIR=`dirname $PWD`
|
PARENTDIR=`dirname $PWD`
|
||||||
|
|
Loading…
Reference in New Issue