home
/
projects
/
cold
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6033d95
)
...
master
author
alex
<
[email protected]
>
Sat, 16 Jul 2022 05:35:53 +0000
(22:35 -0700)
committer
alex
<
[email protected]
>
Sat, 16 Jul 2022 05:35:53 +0000
(22:35 -0700)
cold-setup
patch
|
blob
|
history
diff --git
a/cold-setup
b/cold-setup
index e161b40034c8fa808f2cdaaafd77e58537fc5064..45167aa8e28299ee933a968482130835a32e7d34 100755
(executable)
--- a/
cold-setup
+++ b/
cold-setup
@@
-15,6
+15,7
@@
M=3
N=7
# variables used in usb functions
N=7
# variables used in usb functions
+PASSPHRASE=
USB_DECRYPT_NAME="cold-usb"
USB_PATH=
USB_PATH_PRE_DECRYPT=
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"
}
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
confirm() {
local RESULT
while true; do
@@
-198,6
+205,7
@@
parse_arguments() {
for arg in "$@"; do
shift
case "$arg" in
for arg in "$@"; do
shift
case "$arg" in
+ "--check") set -- "$@" "-c" ;;
"--help") set -- "$@" "-h" ;;
"--interactive") set -- "$@" "-i" ;;
"--no-encryption") set -- "$@" "-p" ;;
"--help") set -- "$@" "-h" ;;
"--interactive") set -- "$@" "-i" ;;
"--no-encryption") set -- "$@" "-p" ;;
@@
-209,9
+217,10
@@
parse_arguments() {
# parse short options
OPTIND=1
# parse short options
OPTIND=1
- while getopts "hm:n:ip" opt
+ while getopts "
c
hm:n:ip" opt
do
case "$opt" in
do
case "$opt" in
+ "c") set_mode "check" ;;
"h") usage ;;
"i") set_mode "interactive" ;;
"m") set_threshold "$OPTARG" ;;
"h") usage ;;
"i") set_mode "interactive" ;;
"m") set_threshold "$OPTARG" ;;
@@
-235,6
+244,7
@@
set_encryption() {
set_mode() {
case "$1" in
set_mode() {
case "$1" in
+ "check") MODE="check" ;;
"interactive") MODE="interactive" ;;
*)
log_error "ERROR: unknown mode \"$1\""
"interactive") MODE="interactive" ;;
*)
log_error "ERROR: unknown mode \"$1\""
@@
-599,10
+609,19
@@
main() {
validate_parameters
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
bitcoin_core_start