Update parser once more

This commit is contained in:
Luke Murphy 2020-10-26 17:30:37 +01:00
parent 9580199616
commit e6458e5e60
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

36
abra
View File

@ -130,10 +130,10 @@ return 1; }; stdout() { printf -- "cat <<'EOM'\n%s\nEOM\n" "$1"; }; stderr() {
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:871}
usage=${DOC:40:577}; digest=d484a; shorts=(-s -c -h -e -v '')
longs=(--stack --config --help --env --version --user); argcounts=(1 1 0 1 0 1)
node_0(){ value __stack 0; }; node_1(){ value __config 1; }; node_2(){
switch __help 2; }; node_3(){ value __env 3; }; node_4(){ switch __version 4; }
usage=${DOC:40:577}; digest=d484a; shorts=(-v -c -s -e -h '')
longs=(--version --config --stack --env --help --user); argcounts=(0 1 1 1 0 1)
node_0(){ switch __version 0; }; node_1(){ value __config 1; }; node_2(){
value __stack 2; }; node_3(){ value __env 3; }; node_4(){ switch __help 4; }
node_5(){ value __user 5; }; node_6(){ value _service_ a; }; node_7(){
value _src_ a; }; node_8(){ value _dst_ a; }; node_9(){ value _app_ a; }
node_10(){ value _args_ a true; }; node_11(){ value _secret_ a; }; node_12(){
@ -158,14 +158,14 @@ required 35 28 31 15; }; node_54(){ required 35 28 32 15; }; node_55(){
required 35 28 33; }; node_56(){ required 35 18 43; }; node_57(){
either 36 37 39 40 41 44 45 47 48 51 52 53 54 55 56; }; node_58(){ required 57
}; cat <<<' docopt_exit() { [[ -n $1 ]] && printf "%s\n" "$1" >&2
printf "%s\n" "${DOC:40:577}" >&2; exit 1; }'; unset var___stack var___config \
var___help var___env var___version var___user var__service_ var__src_ \
var__dst_ var__app_ var__args_ var__secret_ var__version_ var__cmd_ var__data_ \
var__host_ var__user_ var__port_ var__command_ var_deploy var_upgrade var_logs \
var_multilogs var_cp var_run var_secret var_generate var_insert var_server \
var_add var_rm var_use var_init var_ls; parse 58 "$@"
local prefix=${DOCOPT_PREFIX:-''}; unset "${prefix}__stack" \
"${prefix}__config" "${prefix}__help" "${prefix}__env" "${prefix}__version" \
printf "%s\n" "${DOC:40:577}" >&2; exit 1; }'; unset var___version \
var___config var___stack var___env var___help var___user var__service_ \
var__src_ var__dst_ var__app_ var__args_ var__secret_ var__version_ var__cmd_ \
var__data_ var__host_ var__user_ var__port_ var__command_ var_deploy \
var_upgrade var_logs var_multilogs var_cp var_run var_secret var_generate \
var_insert var_server var_add var_rm var_use var_init var_ls; parse 58 "$@"
local prefix=${DOCOPT_PREFIX:-''}; unset "${prefix}__version" \
"${prefix}__config" "${prefix}__stack" "${prefix}__env" "${prefix}__help" \
"${prefix}__user" "${prefix}_service_" "${prefix}_src_" "${prefix}_dst_" \
"${prefix}_app_" "${prefix}_args_" "${prefix}_secret_" "${prefix}_version_" \
"${prefix}_cmd_" "${prefix}_data_" "${prefix}_host_" "${prefix}_user_" \
@ -173,11 +173,11 @@ local prefix=${DOCOPT_PREFIX:-''}; unset "${prefix}__stack" \
"${prefix}logs" "${prefix}multilogs" "${prefix}cp" "${prefix}run" \
"${prefix}secret" "${prefix}generate" "${prefix}insert" "${prefix}server" \
"${prefix}add" "${prefix}rm" "${prefix}use" "${prefix}init" "${prefix}ls"
eval "${prefix}"'__stack=${var___stack:-}'
eval "${prefix}"'__config=${var___config:-}'
eval "${prefix}"'__help=${var___help:-false}'
eval "${prefix}"'__env=${var___env:-}'
eval "${prefix}"'__version=${var___version:-false}'
eval "${prefix}"'__config=${var___config:-}'
eval "${prefix}"'__stack=${var___stack:-}'
eval "${prefix}"'__env=${var___env:-}'
eval "${prefix}"'__help=${var___help:-false}'
eval "${prefix}"'__user=${var___user:-}'
eval "${prefix}"'_service_=${var__service_:-}'
eval "${prefix}"'_src_=${var__src_:-}'; eval "${prefix}"'_dst_=${var__dst_:-}'
@ -204,8 +204,8 @@ eval "${prefix}"'add=${var_add:-false}'; eval "${prefix}"'rm=${var_rm:-false}'
eval "${prefix}"'use=${var_use:-false}'
eval "${prefix}"'init=${var_init:-false}'; eval "${prefix}"'ls=${var_ls:-false}'
local docopt_i=1; [[ $BASH_VERSION =~ ^4.3 ]] && docopt_i=2
for ((;docopt_i>0;docopt_i--)); do declare -p "${prefix}__stack" \
"${prefix}__config" "${prefix}__help" "${prefix}__env" "${prefix}__version" \
for ((;docopt_i>0;docopt_i--)); do declare -p "${prefix}__version" \
"${prefix}__config" "${prefix}__stack" "${prefix}__env" "${prefix}__help" \
"${prefix}__user" "${prefix}_service_" "${prefix}_src_" "${prefix}_dst_" \
"${prefix}_app_" "${prefix}_args_" "${prefix}_secret_" "${prefix}_version_" \
"${prefix}_cmd_" "${prefix}_data_" "${prefix}_host_" "${prefix}_user_" \