Files
Velix-MPV-Core/scripts/verify-libmpv-symbols.sh
T

26 lines
625 B
Bash
Executable File

#!/bin/sh
set -eu
test "$#" -eq 1 || { printf 'Usage: %s LIBMPV\n' "$0" >&2; exit 2; }
. "$(dirname -- "$0")/setup-ohos-env.sh"
LIBMPV=$1
SYMBOLS=$($NM -D --defined-only "$LIBMPV")
for symbol in \
mpv_create \
mpv_initialize \
mpv_command \
mpv_set_property \
mpv_get_property \
mpv_render_context_create \
mpv_render_context_render \
mpv_render_context_set_update_callback \
mpv_render_context_free; do
printf '%s\n' "$SYMBOLS" | grep -Eq "[[:space:]]${symbol}$" || {
printf 'Missing libmpv symbol: %s\n' "$symbol" >&2
exit 1
}
printf '%s\n' "$symbol"
done