From 21c30a37e3a3716f294effc0914d10b6d800dbc3 Mon Sep 17 00:00:00 2001 From: LeeW Date: Fri, 31 Jan 2025 14:15:49 +0100 Subject: [PATCH] phase1: update script --- bin/update_sops.sh | 2 ++ example/cmd_sops.sh | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/update_sops.sh b/bin/update_sops.sh index aed72ae..718c136 100755 --- a/bin/update_sops.sh +++ b/bin/update_sops.sh @@ -66,6 +66,7 @@ EOM # UPDATE SOPS CONFIG pushd "${keyfiles_dir}" (fn_update_sops_config) > "${sops_config}" +popd # VERIFY fn_verify_sops_config(){ @@ -81,6 +82,7 @@ fn_verify_sops_config(){ GPG_TTY=$(tty) sops -d "${sops_enc_file}" } if [[ "${secrets_file}" != "0" ]]; then + pushd "${sops_config_dir}" fn_verify_sops_config "${secrets_file}" echo "# SUCESS: all users with keys in this dir should have functional keys" diff --git a/example/cmd_sops.sh b/example/cmd_sops.sh index b44e578..10c5c99 100755 --- a/example/cmd_sops.sh +++ b/example/cmd_sops.sh @@ -4,4 +4,6 @@ set -ueo pipefail curdir="$(realpath $( dirname "${BASH_SOURCE[0]}"))" cd "$( dirname "${BASH_SOURCE[0]}")/.." -./bin/update_sops.sh "${curdir}" "${PWD}"/ +# ./bin/update_sops.sh "${curdir}" "${PWD}"/ + +./bin/update_sops.sh "${curdir}" "${PWD}"/ "${curdir}/mock_secrets.yaml"