codec-utils: Avoid out-of-bounds error
[platform/upstream/gstreamer.git] / scripts / gst-indent-all
1 #!/bin/bash
2
3 BASEDIR=$(dirname $0)
4
5
6 filter_cmd=("cat")
7 if test -f ".indentignore"; then
8     filter_args=()
9     while read -r line; do
10         if test -n "$line"; then
11             filter_args+=("-e" "$line")
12         fi
13     done < ".indentignore"
14     if [[ ${#filter_args[@]} -gt 0 ]]; then
15         filter_cmd=("grep" "-v" "${filter_args[@]}")
16     fi
17 fi
18 git ls-files "*.c" | "${filter_cmd[@]}" | xargs -d '\n' $BASEDIR/gst-indent