adds roles, iter x/n

ADP-179_sops_manage_keys
LeeW 11 months ago
parent 5f2d02f600
commit fd89ab65fd

@ -119,16 +119,19 @@ EOM
echo " ${fpr_list[${ind_2nd_last}]}" echo " ${fpr_list[${ind_2nd_last}]}"
} }
# UPDATE SOPS CONFIG # BEGIN
# TODO: remove the 'pushd;popd' workaround and make the functions aware of the dir being read
pushd "${keyfiles_dir}" > /dev/null 2>&1
if [[ "${opt_list_roles}" -eq 1 ]]; then if [[ "${opt_list_roles}" -eq 1 ]]; then
# list available roles and exit
pushd "${roles_def_dir}" > /dev/null 2>&1 pushd "${roles_def_dir}" > /dev/null 2>&1
>&2 echo "# INFO: listing roles" >&2 echo "# INFO: listing roles"
ls -1d * ls -1d *
exit 0 exit 0
popd > /dev/null 2>&1 popd > /dev/null 2>&1
fi 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}" (fn_update_sops_config) > "${sops_config}"
popd > /dev/null 2>&1 popd > /dev/null 2>&1

Loading…
Cancel
Save