1
Fork 0
lua-libpulse-glib/tools/process_docs.sh
Lucas Schwiderski 366e08498e
feat: Implement introspection for sinks and sources
This provides a way to query the current state for the primary
data structures, as well as common setters.
2022-05-15 22:56:55 +02:00

20 lines
433 B
Bash

#!/bin/sh
OUT="$1"
if [ -z "$OUT" ] || [ ! -d "$OUT" ]; then
echo "No such directory: '$OUT'" >&2
exit 1
fi
LUA=${LUA:-lua}
# Print the command to run similarly to how Make would do it.
run() {
echo "$@"
"$@"
}
find src -iname '*.lua' -or -iname '*.c' -or -iname '*.h' -not -path '*/internal/*' | while read -r f; do
mkdir -p "$(dirname "$OUT/$f")"
run "$LUA" ./tools/preprocessor.lua "$f" "$OUT/$f"
done