Avoid nonportable sorting in report validation batch
This commit is contained in:
parent
4bdac9fd93
commit
493af046ae
|
|
@ -4,6 +4,6 @@ root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)
|
|||
input_dir=${1:-}; [[ -n "$input_dir" && $# -eq 1 ]]||{ echo "Usage: $0 INPUT_DIR" >&2; exit 2; }
|
||||
count=0
|
||||
while IFS= read -r -d '' input; do "$root/tools/validate.sh" "$input"; ((count+=1)); done \
|
||||
< <(find "$input_dir" -type f \( -name '*.json' -o -name '*.yaml' -o -name '*.yml' \) -print0 | sort -z)
|
||||
< <(find "$input_dir" -type f \( -name '*.json' -o -name '*.yaml' -o -name '*.yml' \) -print0)
|
||||
((count > 0))||{ echo "$input_dir: no YAML or JSON reports found" >&2; exit 1; }
|
||||
echo "Validated $count reports"
|
||||
|
|
|
|||
Loading…
Reference in New Issue