diff options
Diffstat (limited to 'mvn-compile.sh')
-rwxr-xr-x | mvn-compile.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/mvn-compile.sh b/mvn-compile.sh new file mode 100755 index 0000000..7d6fff2 --- /dev/null +++ b/mvn-compile.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +fn_build() +{ + t1=`date +%s` + mvn compile test-compile -l $logfile + # date -r $logfile +%s + t2=`date +%s` + total=`expr $t2 - $t1` +} + +logfile=target/build.log + +t0=`for file in $(find src -type f); do date -r "$file" +%s; done | sort -r | uniq | head -1` + +if [ ! -f $logfile ]; then + fn_build +fi + +tb=`date -r $logfile +%s` + +if [ $t0 -gt $tb ]; then + fn_build +fi + +cat $logfile | \ + grep -oE "^\[ERROR\].*\.java.*\]" | \ + sed -E 's/:\[(.*),.*/:\1/' | \ + sort | uniq + +if [ ! -z $total ]; then + echo "$total seconds" +fi
\ No newline at end of file |