Minor fix for api checker script to support macOS

This commit is contained in:
Andrius Dagys 2017-10-23 18:06:02 +01:00
parent 70a7eb8bae
commit c5a6047b0e

View File

@ -1,4 +1,5 @@
#!/bin/bash
set +o posix
echo "Starting API Diff"
@ -11,7 +12,7 @@ if [ ! -f $apiCurrent ]; then
fi
# Remove the two header lines from the diff output.
diffContents=`diff -u $apiCurrent $APIHOME/../build/api/api-corda-*.txt | tail --lines=+3`
diffContents=`diff -u $apiCurrent $APIHOME/../build/api/api-corda-*.txt | tail -n +3`
echo "Diff contents:"
echo "$diffContents"
echo
@ -36,7 +37,7 @@ function forUserImpl() {
awk '/DoNotImplement/,/^##/{ next }{ print }' $1
}
userDiffContents=`diff -u <(forUserImpl $apiCurrent) <(forUserImpl $APIHOME/../build/api/api-corda-*.txt) | tail --lines=+3`
userDiffContents=`diff -u <(forUserImpl $apiCurrent) <(forUserImpl $APIHOME/../build/api/api-corda-*.txt) | tail -n +3`
newAbstracts=$(echo "$userDiffContents" | grep "^+" | grep "\(public\|protected\) abstract")
abstractCount=`grep -v "^$" <<EOF | wc -l