From 9dbdb7d3651383112d8affbde5163db55205ce4b Mon Sep 17 00:00:00 2001 From: LeeW Date: Fri, 14 Feb 2025 14:01:21 +0100 Subject: [PATCH] refactor - consolidate into main function 2/n --- bin/update_sops.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/update_sops.sh b/bin/update_sops.sh index ea70bdc..0ad566b 100755 --- a/bin/update_sops.sh +++ b/bin/update_sops.sh @@ -114,6 +114,10 @@ fn_sops_updatekeys_and_verify(){ } function main(){ + if [[ ! -n "${@}" ]]; then + # if empty args, remove + shift + fi # "anchor" for actions relevant to this script repo_root="$(realpath $(dirname "${BASH_SOURCE[0]}")/..)" # OPTIONS: ARGPARSING and VALIDATION @@ -209,5 +213,6 @@ function main(){ fi } -main "${@}" +# pass-through, set default value +main "${@-}" exit