#!/bin/bash
echo "Decrypt and re-encrypt files ..."
gitroot=$(git rev-parse --show-toplevel)
for f in $(grep -irnl "sops-\|helm-" $gitroot/* | grep "yaml");
do

echo "f=$f"
grep -n "sops-\|helm-\|vault.azure.net" $f
helm secrets dec $f
helm secrets enc $f
rm $f.dec
echo

done



