Review shell scripts

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-01-22 14:07:22 +00:00
parent 8f94687b2b
commit bcbda92c46
27 changed files with 273 additions and 259 deletions

View File

@@ -11,13 +11,13 @@ fi
export SOPS_AGE_KEY_FILE="$1"
find . -type f -name 'sops.yaml' | while IFS= read -r SOPS_FILE; do
dir=$(dirname "${SOPS_FILE}")
echo "${dir}"
find "${dir}" -maxdepth 1 -type f -regextype posix-extended \
find . -type f -name 'sops.yaml' | while IFS= read -r sops_file; do
dir=$(dirname "$sops_file")
echo "$dir"
find "$dir" -maxdepth 1 -type f -regextype posix-extended \
-regex '.+\.(yaml|yml|json|env|ini|bin)' \
! -name 'sops.yaml' | while IFS= read -r file; do
echo "${file}"
nix shell nixpkgs#sops --command sops --config "${SOPS_FILE}" updatekeys "${file}" -y
echo "$file"
nix shell nixpkgs#sops --command sops --config "$sops_file" updatekeys "$file" -y
done
done