diff options
author | Andreas Tobler <a.tobler@schweiz.org> | 2005-09-05 18:46:15 +0000 |
---|---|---|
committer | Andreas Tobler <a.tobler@schweiz.org> | 2005-09-05 18:46:15 +0000 |
commit | 4b37f8f60571d9d5f21ffb630da80abb1dce7e24 (patch) | |
tree | c54b76ddc30aaa9614033109e166ff807dad0923 /scripts | |
parent | 3e6d4b9f9c8347fe9114fc3125d08e2ce72f0d04 (diff) | |
download | classpath-4b37f8f60571d9d5f21ffb630da80abb1dce7e24.tar.gz |
* scripts/check_jni_methods.sh: Make script working with non GNU
grep versions.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check_jni_methods.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/check_jni_methods.sh b/scripts/check_jni_methods.sh index 78f29adf2..243bb7e4a 100755 --- a/scripts/check_jni_methods.sh +++ b/scripts/check_jni_methods.sh @@ -40,14 +40,17 @@ cat > $TMPFILE3 << EOF EOF # Compare again silently. -if diff -b -U 0 $TMPFILE $TMPFILE2 | grep '^[+-]Java' | grep -q -v -f $TMPFILE3; +# Use fgrep and direct the output to /dev/null for compatibility with older +# grep instead of using the non portable -q. +if diff -b -U 0 $TMPFILE $TMPFILE2 | grep '^[+-]Java' | \ + fgrep -v -f $TMPFILE3 > /dev/null; then PROBLEM=1 echo "Found a problem with the JNI methods declared and implemented." echo "(-) missing in implementation, (+) missing in header files" # Compare the found method lists. - diff -b -U 0 $TMPFILE $TMPFILE2 | grep '^[+-]Java' | grep -v -f $TMPFILE3 + diff -b -U 0 $TMPFILE $TMPFILE2 | grep '^[+-]Java' | fgrep -v -f $TMPFILE3 fi # Cleanup. @@ -58,4 +61,3 @@ if test "$PROBLEM" = "1" ; then fi exit 0 - |