[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] [patch] check_jni_methods.sh make protable with non GNU gre
From: |
Andreas Tobler |
Subject: |
[cp-patches] [patch] check_jni_methods.sh make protable with non GNU grep |
Date: |
Mon, 05 Sep 2005 11:42:46 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.5 (Macintosh/20050711) |
Hello,
this patchlet makes the script check_jni_methods.sh working on systems
which do not have a fully POSIX.2 compliant grep, namely solaris.
Checked on sparc solaris10, darwin ppc and linux ppc.
ok?
Andreas
2005-09-05 Andreas Tobler <address@hidden>
* scripts/check_jni_methods.sh: Make script working with non GNU
grep versions.
Index: scripts/check_jni_methods.sh
===================================================================
RCS file: /cvsroot/classpath/classpath/scripts/check_jni_methods.sh,v
retrieving revision 1.9
diff -u -r1.9 check_jni_methods.sh
--- scripts/check_jni_methods.sh 17 Aug 2005 10:15:51 -0000 1.9
+++ scripts/check_jni_methods.sh 5 Sep 2005 09:06:00 -0000
@@ -40,14 +40,17 @@
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 @@
fi
exit 0
-
- [cp-patches] [patch] check_jni_methods.sh make protable with non GNU grep,
Andreas Tobler <=