ci: Port CI to the new monorepo
[platform/upstream/gstreamer.git] / scripts / gst-indent-all
1 #!/bin/bash
2
3 filter_cmd=("cat")
4 if test -f ".indentignore"; then
5     filter_args=()
6     while read -r line; do
7         if test -n "$line"; then
8             filter_args+=("-e" "$line")
9         fi
10     done < ".indentignore"
11     if [[ ${#filter_args[@]} -gt 0 ]]; then
12         filter_cmd=("grep" "-v" "${filter_args[@]}")
13     fi
14 fi
15 git ls-files "*.c" | "${filter_cmd[@]}" | xargs -d '\n' gst-indent