swarm/scripts/normalize-all-yaml.sh
2024-01-06 01:21:21 +00:00

9 lines
290 B
Bash
Executable File

#!/bin/bash -e
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR/..
find data -type f -name '*.yaml' -print0 | xargs -0 --max-args 1 sed -i -e 's/[[:blank:]]\+$//'
find data -type f -name '*.yaml' -print0 | xargs -0 --max-args 1 yq --inplace