2023-06-17 00:15:23 -04:00

7 lines
198 B
Bash
Executable File

#!/bin/bash
shopt -s globstar
shopt -s nullglob
for i in merge/**/*.{yml,yaml} ; do
[[ -e "${i##merge/}" ]] && yq ea -i "select(fileIndex == 0) * select(fileIndex == 1)" "${i##merge/}" "${i}"
done