mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-11 10:56:38 +00:00
f3f220d04b
Those files follow gst-indent style and it would be good to have a consistent style Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4023>
31 lines
819 B
Bash
Executable file
31 lines
819 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
|
|
|
|
if test -f ".indent_cpp_list"; then
|
|
filter_args=()
|
|
while read -r line; do
|
|
if test -n "$line"; then
|
|
filter_args+=("-e" "$line")
|
|
fi
|
|
done < ".indent_cpp_list"
|
|
if [[ ${#filter_args[@]} -gt 0 ]]; then
|
|
filter_cmd=("grep" "-E" "${filter_args[@]}")
|
|
git ls-files "*.cpp" | "${filter_cmd[@]}" | xargs -d '\n' $BASEDIR/gst-indent
|
|
fi
|
|
fi
|