From: alex Date: Sat, 16 Jul 2022 05:35:53 +0000 (-0700) Subject: ... X-Git-Url: http://git.infiniteadaptability.org/?a=commitdiff_plain;p=cold ... --- diff --git a/cold-setup b/cold-setup index e161b40..45167aa 100755 --- a/cold-setup +++ b/cold-setup @@ -15,6 +15,7 @@ M=3 N=7 # variables used in usb functions +PASSPHRASE= USB_DECRYPT_NAME="cold-usb" USB_PATH= USB_PATH_PRE_DECRYPT= @@ -59,6 +60,12 @@ bitcoin_core_stop_interactive() { log_msg "stop bitcoin core:\n\n\tbitcoin-cli stop\n" } +check() { + local UUIDS=() + log_error "not implemented\n" + exit 1 +} + confirm() { local RESULT while true; do @@ -198,6 +205,7 @@ parse_arguments() { for arg in "$@"; do shift case "$arg" in + "--check") set -- "$@" "-c" ;; "--help") set -- "$@" "-h" ;; "--interactive") set -- "$@" "-i" ;; "--no-encryption") set -- "$@" "-p" ;; @@ -209,9 +217,10 @@ parse_arguments() { # parse short options OPTIND=1 - while getopts "hm:n:ip" opt + while getopts "chm:n:ip" opt do case "$opt" in + "c") set_mode "check" ;; "h") usage ;; "i") set_mode "interactive" ;; "m") set_threshold "$OPTARG" ;; @@ -235,6 +244,7 @@ set_encryption() { set_mode() { case "$1" in + "check") MODE="check" ;; "interactive") MODE="interactive" ;; *) log_error "ERROR: unknown mode \"$1\"" @@ -599,10 +609,19 @@ main() { validate_parameters - if [[ "$MODE" == "interactive" ]]; then - main_interactive - exit - fi + case "$MODE" in + "check") + check + exit + ;; + "interactive") + main_interactive + exit + ;; + esac + + echo "here" + exit 1 bitcoin_core_start