From 293ed87f0cf7a12b5165de9333350a9bf09a7f3d Mon Sep 17 00:00:00 2001 From: LeeW Date: Mon, 3 Feb 2025 11:02:19 +0100 Subject: [PATCH] refactor: args --- bin/update_sops.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/update_sops.sh b/bin/update_sops.sh index f79f749..cbaedd9 100755 --- a/bin/update_sops.sh +++ b/bin/update_sops.sh @@ -13,9 +13,15 @@ secrets_file_list=() while (( $# >= 1 ));do cur="${1}"; case $cur in + # ARGS: print this help + -h|--help) echo "# ARGUMENTS:"; grep -A 1 '# ARGS:' "${BASH_SOURCE[0]}"; exit 0 ;; + # ARGS: dir containing gpg keyfiles -k|--key|--keyfiles) keyfiles_dir="${2}"; shift ;; + # ARGS: dir containing .sops.yaml (sops config file) -c|--config_dir) sops_config_dir="${2}"; shift ;; + # ARGS: [optional] [list] specify files containing sops-encrypted secrets -s|--secrets_file|-f|--file) secrets_file_list+=( "${2}" ); shift ;; + # ARGS: [optional] [list] specify files containing sops-encrypted secrets *) secrets_file_list+=( "${cur}" ) esac shift;