From 3a56908dd54d2f66c87beb10aa0be8d2faf7266a Mon Sep 17 00:00:00 2001 From: dojyorin Date: Sat, 30 Sep 2023 01:43:12 +0900 Subject: [PATCH] convert yaml. --- .github/workflows/to_yaml.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/to_yaml.sh b/.github/workflows/to_yaml.sh index d70cb17..cea5c29 100755 --- a/.github/workflows/to_yaml.sh +++ b/.github/workflows/to_yaml.sh @@ -1,10 +1,8 @@ #!/bin/sh set -eu -while [[ ${#} -ge 1 ]]; do - if [[ -f ./${1}.json ]]; then - yq -I 4 -o y ./${1}.json | head -c -1 > ./${1}.yaml - fi +cd ${0%/*} - shift -done \ No newline at end of file +for _v in $(find ./ -maxdepth 1 -type f -name '*.json'); do + yq -I 4 -o y ${_v} | head -c -1 > ${_v%.*}.yaml +done; unset _v \ No newline at end of file