Correctly find the username of a peer-reflexive candidate in google mode when it...
[sipe-libnice.git] / scripts / check-symbols.sh
blobde5c18f403a035fe494287a87534f07dbb631ddd
1 #!/bin/sh
3 usage()
5 echo "usage: $0 library symbol-file"
6 exit 1
9 test -n "$1" || usage
10 lib="$1"
11 test -n "$2" || usage
12 symbol_file="$2"
14 make_symbol_list=`dirname $0`/make-symbol-list.sh
15 test -f "$make_symbol_list" || exit 1
17 if ! test -f "$symbol_file"; then
18 echo "$symbol_file doesn't exist"
19 exit 1
22 diff=`sh $make_symbol_list "$lib" | \
23 diff -uB "$symbol_file" - | tail -n +3`
25 # stop if there are no differences
26 test -z "$diff" && exit 0
28 echo "symbols for $lib changed"
30 if echo "$diff" | grep -q '^-'; then
31 echo " missing:"
32 echo "$diff" | grep '^-' | cut -b 2- | \
33 xargs -i echo " " "{}"
36 if echo "$diff" | grep -q '^+'; then
37 echo " extra:"
38 echo "$diff" | grep '^+' | cut -b 2- | \
39 xargs -i echo " " "{}"
42 exit 1