mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 05:40:04 +01:00
24 lines
505 B
Bash
Executable file
24 lines
505 B
Bash
Executable file
#!/bin/bash
|
|
#
|
|
# simple check for exported symbols
|
|
#
|
|
# Usage: symbols-leak-test /path/to/mapfile /path/to/libinput/src
|
|
|
|
mapfile="$1"
|
|
shift
|
|
srcdir="$1"
|
|
shift
|
|
|
|
if [[ -z "$mapfile" || -z "$srcdir" ]]; then
|
|
echo "Usage: symbols-leak-test /path/to/mapfile /path/to/libinput/src"
|
|
exit 2
|
|
fi
|
|
|
|
set -e
|
|
diff -a -u \
|
|
<(cat "$mapfile" | \
|
|
grep '^\s\+libinput_.*' | \
|
|
sed -e 's/^\s\+\(.*\);/\1/' | sort) \
|
|
<(cat "$srcdir"/*.c | \
|
|
grep LIBINPUT_EXPORT -A 1 | grep '^libinput_.*' | \
|
|
sed -e 's/(.*//' | sort)
|