test/symbols-leak-test: use more portable shebang
[platform/upstream/libxkbcommon.git] / test / symbols-leak-test.bash
1 #!/usr/bin/env bash
2 set -e
3
4 # Check that all exported symbols are specified in the symbol
5 # version scripts.  If this fails, please update the appropriate
6 # (adding new version nodes when needed).
7
8 # xkbcommon symbols
9 diff -a -u \
10     <(cat "$top_srcdir"/xkbcommon.map | \
11         grep '^\s\+xkb_.*' | \
12         sed -e 's/^\s\+\(.*\);/\1/' | sort) \
13     <(cat "$top_srcdir"/src/{,xkbcomp,compose}/*.c | \
14         grep XKB_EXPORT -A 1 | grep '^xkb_.*' | \
15         sed -e 's/(.*//' | sort)
16
17 # xkbcommon-x11 symbols
18 diff -a -u \
19     <(cat "$top_srcdir"/xkbcommon-x11.map | \
20         grep '^\s\+xkb_.*' | \
21         sed -e 's/^\s\+\(.*\);/\1/' | sort) \
22     <(cat "$top_srcdir"/src/x11/*.c | \
23         grep XKB_EXPORT -A 1 | grep '^xkb_.*' | \
24         sed -e 's/(.*//' | sort)