test/symbols-leak-test.bash: make it easier to read Signed-off-by: Ran Benita <ran234@gmail.com>
diff --git a/test/symbols-leak-test.bash b/test/symbols-leak-test.bash
index bf03790..0a74c5f 100755
--- a/test/symbols-leak-test.bash
+++ b/test/symbols-leak-test.bash
@@ -1,24 +1,16 @@
#!/usr/bin/env bash
set -e
-# Check that all exported symbols are specified in the symbol
-# version scripts. If this fails, please update the appropriate
-# (adding new version nodes when needed).
+# Check that all exported symbols are specified in the symbol version
+# scripts. If this fails, please update the appropriate .map file
+# (adding new version nodes as needed).
# xkbcommon symbols
diff -a -u \
- <(cat "$top_srcdir"/xkbcommon.map | \
- grep '^\s\+xkb_.*' | \
- sed -e 's/^\s\+\(.*\);/\1/' | sort) \
- <(cat "$top_srcdir"/src/{,xkbcomp,compose}/*.c | \
- grep XKB_EXPORT -A 1 | grep '^xkb_.*' | \
- sed -e 's/(.*//' | sort)
+ <(grep -h '^\s\+xkb_' "$top_srcdir"/xkbcommon.map | sed -e 's/^\s\+\(.*\);/\1/' | sort) \
+ <(grep -h 'XKB_EXPORT' -A1 "$top_srcdir"/src/{,xkbcomp,compose}/*.c | grep '^xkb_' | sed -e 's/(.*//' | sort)
# xkbcommon-x11 symbols
diff -a -u \
- <(cat "$top_srcdir"/xkbcommon-x11.map | \
- grep '^\s\+xkb_.*' | \
- sed -e 's/^\s\+\(.*\);/\1/' | sort) \
- <(cat "$top_srcdir"/src/x11/*.c | \
- grep XKB_EXPORT -A 1 | grep '^xkb_.*' | \
- sed -e 's/(.*//' | sort)
+ <(grep -h '^\s\+xkb_.*' "$top_srcdir"/xkbcommon-x11.map | sed -e 's/^\s\+\(.*\);/\1/' | sort) \
+ <(grep -h 'XKB_EXPORT' -A1 "$top_srcdir"/src/x11/*.c | grep '^xkb_' | sed -e 's/(.*//' | sort)