From f192204f007f38446c46b54e805e280de20958c1 Mon Sep 17 00:00:00 2001 From: LeeW Date: Thu, 13 Feb 2025 14:29:07 +0100 Subject: [PATCH] refactor: better function names --- bin/update_sops.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/update_sops.sh b/bin/update_sops.sh index 1885100..00d54e4 100755 --- a/bin/update_sops.sh +++ b/bin/update_sops.sh @@ -64,7 +64,7 @@ fi # /VALIDATE INPUTS # /OPTIONS: ARGPARSING and VALIDATION -function fn_extract_fpr(){ +function fn_gpg_extract_fpr(){ gpgkeyfile=$1;shift; # fingerprint # caveat: restrict to netgo.de email, use-case: @@ -75,7 +75,7 @@ function fn_extract_fpr(){ echo "${fpr}" } -function fn_extract_uid(){ +function fn_gpg_extract_uid(){ gpgkeyfile=$1;shift; # user id # caveat: restrict to netgo.de email, use-case: @@ -96,13 +96,13 @@ function fn_generate_sops_config(){ type_list=() for gpgkeyfile in *automation*gpg.pub; do type_list+=( "autom" ) - fpr_list+=( "$(fn_extract_fpr "${gpgkeyfile}")" ) - uid_list+=( "$(fn_extract_uid "${gpgkeyfile}")" ) + fpr_list+=( "$(fn_gpg_extract_fpr "${gpgkeyfile}")" ) + uid_list+=( "$(fn_gpg_extract_uid "${gpgkeyfile}")" ) done for gpgkeyfile in $(ls *gpg.pub | grep -v automation); do type_list+=( "human" ) - fpr_list+=( "$(fn_extract_fpr "${gpgkeyfile}")" ) - uid_list+=( "$(fn_extract_uid "${gpgkeyfile}")" ) + fpr_list+=( "$(fn_gpg_extract_fpr "${gpgkeyfile}")" ) + uid_list+=( "$(fn_gpg_extract_uid "${gpgkeyfile}")" ) done