Review shell scripts
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user