gstreamer/scripts/gst-indent-all
Akkariin Meiko 27c4ec74a1 Update
2022-03-12 03:16:09 +08:00

19 lines
429 B
Bash
Executable File

#!/bin/bash
BASEDIR=$(dirname $0)
filter_cmd=("cat")
if test -f ".indentignore"; then
filter_args=()
while read -r line; do
if test -n "$line"; then
filter_args+=("-e" "$line")
fi
done < ".indentignore"
if [[ ${#filter_args[@]} -gt 0 ]]; then
filter_cmd=("grep" "-v" "${filter_args[@]}")
fi
fi
git ls-files "*.c" | "${filter_cmd[@]}" | xargs -d '\n' $BASEDIR/gst-indent