Factor print_usage out

pull/1062/head
Eugene Kim 6 years ago
parent 7f2199455f
commit 1f6554b718
  1. 9
      scripts/node.sh

@ -84,14 +84,19 @@ if [[ $EUID -ne 0 ]]; then
exit 1 exit 1
fi fi
usage() { print_usage() {
msg "$@"
cat <<- ENDEND cat <<- ENDEND
usage: ${progname} [-1c] account_address usage: ${progname} [-1c] account_address
-c back up database/logs and start clean -c back up database/logs and start clean
(use only when directed by Harmony) (use only when directed by Harmony)
-1 do not loop; run once and exit -1 do not loop; run once and exit
-h print this help and exit
ENDEND ENDEND
}
usage() {
msg "$@"
print_usage >&2
exit 64 # EX_USAGE exit 64 # EX_USAGE
} }

Loading…
Cancel
Save