From fd89ab65fd4a580ae2e2add9ee5f3218058c895b Mon Sep 17 00:00:00 2001 From: LeeW Date: Fri, 7 Feb 2025 10:51:25 +0100 Subject: [PATCH] adds roles, iter x/n --- bin/update_sops.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/update_sops.sh b/bin/update_sops.sh index e396674..776b62f 100755 --- a/bin/update_sops.sh +++ b/bin/update_sops.sh @@ -119,16 +119,19 @@ EOM echo " ${fpr_list[${ind_2nd_last}]}" } -# UPDATE SOPS CONFIG -# TODO: remove the 'pushd;popd' workaround and make the functions aware of the dir being read -pushd "${keyfiles_dir}" > /dev/null 2>&1 +# BEGIN if [[ "${opt_list_roles}" -eq 1 ]]; then + # list available roles and exit pushd "${roles_def_dir}" > /dev/null 2>&1 >&2 echo "# INFO: listing roles" ls -1d * exit 0 popd > /dev/null 2>&1 fi + +# UPDATE SOPS CONFIG +# TODO: remove the 'pushd;popd' workaround and make the functions aware of the dir being read +pushd "${keyfiles_dir}" > /dev/null 2>&1 (fn_update_sops_config) > "${sops_config}" popd > /dev/null 2>&1