Change -v option to version subcommand

This commit is contained in:
3wc 2020-12-30 22:19:28 +02:00
parent 81782bb5f0
commit e6b24fe65c

17
abra
View File

@ -145,10 +145,10 @@ printf -- "cat <<'EOM' >&2\n%s\nEOM\n" "$1"; }; error() {
[[ -n $1 ]] && stderr "$1"; stderr "$usage"; _return 1; }; _return() {
printf -- "exit %d\n" "$1"; exit "$1"; }; set -e; trimmed_doc=${DOC:1:1429}
usage=${DOC:40:1165}; digest=cb5e2
shorts=(-s -e -h '' '' '' '' '' '' '' '' '' '' '')
longs=(--stack --env --help --server --domain --app-name --pass --auto --status --skip-check --force --no-tty --user --all)
argcounts=(1 1 0 1 1 1 0 0 0 0 0 0 1 0); node_0(){ value __stack 0; }; node_1(){
value __env 1; }; node_2(){ switch __help 2; }; node_3(){ value __server 3; }
shorts=(-e -s -h '' '' '' '' '' '' '' '' '' '' '')
longs=(--env --stack --help --server --domain --app-name --pass --auto --status --skip-check --force --no-tty --user --all)
argcounts=(1 1 0 1 1 1 0 0 0 0 0 0 1 0); node_0(){ value __env 0; }; node_1(){
value __stack 1; }; node_2(){ switch __help 2; }; node_3(){ value __server 3; }
node_4(){ value __domain 4; }; node_5(){ value __app_name 5; }; node_6(){
switch __pass 6; }; node_7(){ switch __auto 7; }; node_8(){ switch __status 8; }
node_9(){ switch __skip_check 9; }; node_10(){ switch __force 10; }; node_11(){
@ -192,7 +192,7 @@ required 53 50; }; node_98(){ required 53 51; }; node_99(){
either 59 63 65 66 67 71 73 74 75 76 80 81 83 84 87 89 92 93 94 95 96 97 98; }
node_100(){ required 99; }; cat <<<' docopt_exit() {
[[ -n $1 ]] && printf "%s\n" "$1" >&2; printf "%s\n" "${DOC:40:1165}" >&2
exit 1; }'; unset var___stack var___env var___help var___server var___domain \
exit 1; }'; unset var___env var___stack var___help var___server var___domain \
var___app_name var___pass var___auto var___status var___skip_check var___force \
var___no_tty var___user var___all var__type_ var__app_ var__service_ var__src_ \
var__dst_ var__args_ var__secret_ var__version_ var__cmd_ var__data_ \
@ -200,7 +200,7 @@ var__command_ var__host_ var__user_ var__port_ var_app var_new var_list var_ls \
var_deploy var_undeploy var_config var_delete var_rm var_logs var_cp var_check \
var_ps var_run var_secret var_auto var_generate var_insert var_server var_add \
var_init var_apps var_upgrade var_version; parse 100 "$@"
local prefix=${DOCOPT_PREFIX:-''}; unset "${prefix}__stack" "${prefix}__env" \
local prefix=${DOCOPT_PREFIX:-''}; unset "${prefix}__env" "${prefix}__stack" \
"${prefix}__help" "${prefix}__server" "${prefix}__domain" \
"${prefix}__app_name" "${prefix}__pass" "${prefix}__auto" "${prefix}__status" \
"${prefix}__skip_check" "${prefix}__force" "${prefix}__no_tty" \
@ -213,9 +213,8 @@ local prefix=${DOCOPT_PREFIX:-''}; unset "${prefix}__stack" "${prefix}__env" \
"${prefix}logs" "${prefix}cp" "${prefix}check" "${prefix}ps" "${prefix}run" \
"${prefix}secret" "${prefix}auto" "${prefix}generate" "${prefix}insert" \
"${prefix}server" "${prefix}add" "${prefix}init" "${prefix}apps" \
"${prefix}upgrade" "${prefix}version"
"${prefix}upgrade" "${prefix}version"; eval "${prefix}"'__env=${var___env:-}'
eval "${prefix}"'__stack=${var___stack:-}'
eval "${prefix}"'__env=${var___env:-}'
eval "${prefix}"'__help=${var___help:-false}'
eval "${prefix}"'__server=${var___server:-}'
eval "${prefix}"'__domain=${var___domain:-}'
@ -261,7 +260,7 @@ eval "${prefix}"'apps=${var_apps:-false}'
eval "${prefix}"'upgrade=${var_upgrade:-false}'
eval "${prefix}"'version=${var_version:-false}'; local docopt_i=1
[[ $BASH_VERSION =~ ^4.3 ]] && docopt_i=2; for ((;docopt_i>0;docopt_i--)); do
declare -p "${prefix}__stack" "${prefix}__env" "${prefix}__help" \
declare -p "${prefix}__env" "${prefix}__stack" "${prefix}__help" \
"${prefix}__server" "${prefix}__domain" "${prefix}__app_name" \
"${prefix}__pass" "${prefix}__auto" "${prefix}__status" \
"${prefix}__skip_check" "${prefix}__force" "${prefix}__no_tty" \