mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 22:16:22 +00:00
citemplate: Allow spaces in filenames when indenting
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/328>
This commit is contained in:
parent
1ab716b71d
commit
159e0e8134
1 changed files with 6 additions and 6 deletions
|
@ -359,19 +359,19 @@ gst indent:
|
|||
# man indent. grep RETURN VALUE, grab a beer on my behalf...
|
||||
- indent --version || true
|
||||
- |
|
||||
filter_cmd="cat"
|
||||
filter_cmd=("cat")
|
||||
if test -f ".indentignore"; then
|
||||
filter_args=""
|
||||
filter_args=()
|
||||
while read -r line; do
|
||||
if test -n "$line"; then
|
||||
filter_args="$filter_args -e $line"
|
||||
filter_args+=("-e" "$line")
|
||||
fi
|
||||
done < ".indentignore"
|
||||
if test -n "$filter_args"; then
|
||||
filter_cmd="grep -v $filter_args"
|
||||
if [[ ${#filter_args[@]} -gt 0 ]]; then
|
||||
filter_cmd=("grep" "-v" "${filter_args[@]}")
|
||||
fi
|
||||
fi
|
||||
find . -name '*.c' | $filter_cmd | xargs gst-indent
|
||||
find . -name '*.c' | "${filter_cmd[@]}" | xargs -d '\n' gst-indent
|
||||
- |
|
||||
if git diff --quiet; then
|
||||
echo "Code is properly formatted"
|
||||
|
|
Loading…
Reference in a new issue