Unquote WOORL expansion to allow extra cli args (#60)

* Hack my way out of no-ws-in-filename problem
This commit is contained in:
Andrew Mayorov 2019-07-16 19:08:28 +03:00 committed by GitHub
parent 0a7fee6551
commit c05e83a1b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 17 additions and 17 deletions

View File

@ -51,7 +51,7 @@ fi
[ -f woorlrc ] && source woorlrc [ -f woorlrc ] && source woorlrc
"${WOORL:-woorl}" \ "${WOORL[@]:-woorl}" \
-s "${DAMSEL}/proto/payment_processing.thrift" \ -s "${DAMSEL}/proto/payment_processing.thrift" \
"http://${HELLGATE:-hellgate}:8022/v1/processing/invoicing" \ "http://${HELLGATE:-hellgate}:8022/v1/processing/invoicing" \
Invoicing CreateManualRefund "${USERINFO}" "\"${INVOICE_ID}\"" "\"${PAYMENT_ID}\"" "${PARAMS}" Invoicing CreateManualRefund "${USERINFO}" "\"${INVOICE_ID}\"" "\"${PAYMENT_ID}\"" "${PARAMS}"

View File

@ -23,7 +23,7 @@ case "$1" in
;; ;;
* ) * )
FIXTURE=$("${LIBDIR}/template.sh" "${CURDIR}/base-fixture.commit.json.tpl" $*) FIXTURE=$("${LIBDIR}/template.sh" "${CURDIR}/base-fixture.commit.json.tpl" $*)
"${WOORL:-woorl}" $* \ "${WOORL[@]:-woorl}" $* \
-s "${DAMSEL}/proto/domain_config.thrift" \ -s "${DAMSEL}/proto/domain_config.thrift" \
"http://${DOMINANT:-dominant}:8022/v1/domain/repository" \ "http://${DOMINANT:-dominant}:8022/v1/domain/repository" \
Repository Commit 0 "${FIXTURE}" Repository Commit 0 "${FIXTURE}"

View File

@ -8,7 +8,7 @@ shift 1
[ -z "${CURRENCY}" ] && { echo "No currency code specified"; exit -1; } [ -z "${CURRENCY}" ] && { echo "No currency code specified"; exit -1; }
"${WOORL:-woorl}" $* \ "${WOORL[@]:-woorl}" $* \
-s "${DAMSEL}/proto/accounter.thrift" \ -s "${DAMSEL}/proto/accounter.thrift" \
"http://${SHUMWAY:-shumway}:8022/accounter" \ "http://${SHUMWAY:-shumway}:8022/accounter" \
Accounter CreateAccount "{\"currency_sym_code\":\"${CURRENCY}\"}" Accounter CreateAccount "{\"currency_sym_code\":\"${CURRENCY}\"}"

View File

@ -43,7 +43,7 @@ CALLARGS=$(cat <<END
END END
) )
"${WOORL:-woorl}" -s "${MGPROTO}/proto/state_processing.thrift" \ "${WOORL[@]:-woorl}" -s "${MGPROTO}/proto/state_processing.thrift" \
"http://${MACHINEGUN:-machinegun}:8022/v1/automaton" \ "http://${MACHINEGUN:-machinegun}:8022/v1/automaton" \
Automaton Call "${MACHINEDESC}" "${CALLARGS}" \ Automaton Call "${MACHINEDESC}" "${CALLARGS}" \
| grep -sqF 'MachineFailed' | grep -sqF 'MachineFailed'

View File

@ -29,6 +29,6 @@ BATCHID="${2}"
ACCOUNTER="http://${SHUMWAY:-shumway}:8022/accounter" ACCOUNTER="http://${SHUMWAY:-shumway}:8022/accounter"
"${WOORL:-woorl}" -s "${DAMSEL}/proto/accounter.thrift" \ "${WOORL[@]:-woorl}" -s "${DAMSEL}/proto/accounter.thrift" \
"${ACCOUNTER}" Accounter GetPlan "\"${PLANID}\"" | \ "${ACCOUNTER}" Accounter GetPlan "\"${PLANID}\"" | \
jq ".batch_list[] | select(.id == ${BATCHID})" jq ".batch_list[] | select(.id == ${BATCHID})"

View File

@ -8,7 +8,7 @@ DAMSEL="${CWD}/../../damsel"
SCRIPTNAME=$(basename $0) SCRIPTNAME=$(basename $0)
get_events () { get_events () {
"${WOORL:-woorl}" \ "${WOORL[@]:-woorl}" \
-s "${DAMSEL}/proto/payment_processing.thrift" \ -s "${DAMSEL}/proto/payment_processing.thrift" \
"http://${HELLGATE:-hellgate}:8022/v1/processing/invoicing" \ "http://${HELLGATE:-hellgate}:8022/v1/processing/invoicing" \
Invoicing GetEvents "$1" "$2" "$3" Invoicing GetEvents "$1" "$2" "$3"

View File

@ -8,7 +8,7 @@ DAMSEL="${CWD}/../../damsel"
SCRIPTNAME=$(basename $0) SCRIPTNAME=$(basename $0)
get_state () { get_state () {
"${WOORL:-woorl}" \ "${WOORL[@]:-woorl}" \
-s "${DAMSEL}/proto/payment_processing.thrift" \ -s "${DAMSEL}/proto/payment_processing.thrift" \
"http://${HELLGATE:-hellgate}:8022/v1/processing/invoicing" \ "http://${HELLGATE:-hellgate}:8022/v1/processing/invoicing" \
Invoicing Get "$1" "$2" Invoicing Get "$1" "$2"

View File

@ -8,7 +8,7 @@ DAMSEL="${CWD}/../../damsel"
SCRIPTNAME=$(basename $0) SCRIPTNAME=$(basename $0)
get_events () { get_events () {
"${WOORL:-woorl}" $4 \ "${WOORL[@]:-woorl}" $4 \
-s "${DAMSEL}/proto/payment_processing.thrift" \ -s "${DAMSEL}/proto/payment_processing.thrift" \
"http://${HELLGATE:-hellgate}:8022/v1/processing/partymgmt" \ "http://${HELLGATE:-hellgate}:8022/v1/processing/partymgmt" \
PartyManagement GetEvents "$1" "$2" "$3" PartyManagement GetEvents "$1" "$2" "$3"

View File

@ -8,7 +8,7 @@ DAMSEL="${CWD}/../../damsel"
SCRIPTNAME=$(basename $0) SCRIPTNAME=$(basename $0)
get_party () { get_party () {
"${WOORL:-woorl}" $3 \ "${WOORL[@]:-woorl}" $3 \
-s "${DAMSEL}/proto/payment_processing.thrift" \ -s "${DAMSEL}/proto/payment_processing.thrift" \
"http://${HELLGATE:-hellgate}:8022/v1/processing/partymgmt" \ "http://${HELLGATE:-hellgate}:8022/v1/processing/partymgmt" \
PartyManagement Get "$1" "$2" PartyManagement Get "$1" "$2"

View File

@ -9,7 +9,7 @@ MACHINE_NS="\"${1}\""
MACHINE_ID="{\"id\":\"${2}\"}" MACHINE_ID="{\"id\":\"${2}\"}"
shift 2 shift 2
"${WOORL:-woorl}" $* \ "${WOORL[@]:-woorl}" $* \
-s "${MGPROTO}/proto/state_processing.thrift" \ -s "${MGPROTO}/proto/state_processing.thrift" \
"http://${MACHINEGUN:-machinegun}:8022/v1/automaton" \ "http://${MACHINEGUN:-machinegun}:8022/v1/automaton" \
Automaton Repair "${MACHINE_NS}" "${MACHINE_ID}" \ Automaton Repair "${MACHINE_NS}" "${MACHINE_ID}" \

View File

@ -34,7 +34,7 @@ USERINFO=$(jq -nc "{id:\"${SCRIPTNAME}\", type:{service_user:{}}}")
[ -f woorlrc ] && source woorlrc [ -f woorlrc ] && source woorlrc
"${WOORL:-woorl}" \ "${WOORL[@]:-woorl}" \
-s "${DAMSEL}/proto/payment_processing.thrift" \ -s "${DAMSEL}/proto/payment_processing.thrift" \
"http://${HELLGATE:-hellgate}:8022/v1/processing/invoicing" \ "http://${HELLGATE:-hellgate}:8022/v1/processing/invoicing" \
Invoicing RefundPayment "${USERINFO}" "\"${INVOICE}\"" "\"${PAYMENT}\"" "${PARAMS}" Invoicing RefundPayment "${USERINFO}" "\"${INVOICE}\"" "\"${PAYMENT}\"" "${PARAMS}"

View File

@ -55,7 +55,7 @@ INVOICE_CHANGES="${2}"
USERINFO='{"id":"woorl","type":{"service_user":{}}}' USERINFO='{"id":"woorl","type":{"service_user":{}}}'
"${WOORL:-woorl}" \ "${WOORL[@]:-woorl}" \
-s "${DAMSEL}/proto/payment_processing.thrift" \ -s "${DAMSEL}/proto/payment_processing.thrift" \
"http://${HELLGATE:-hellgate}:8022/v1/processing/invoicing" \ "http://${HELLGATE:-hellgate}:8022/v1/processing/invoicing" \
Invoicing Repair "${USERINFO}" "\"${INVOICE}\"" "${INVOICE_CHANGES}" "${ACTION}" "${PARAMS}" Invoicing Repair "${USERINFO}" "\"${INVOICE}\"" "${INVOICE_CHANGES}" "${ACTION}" "${PARAMS}"

View File

@ -30,9 +30,9 @@ BATCH="${2}"
ACCOUNTER="http://${SHUMWAY:-shumway}:8022/accounter" ACCOUNTER="http://${SHUMWAY:-shumway}:8022/accounter"
"${WOORL:-woorl}" -s "${DAMSEL}/proto/accounter.thrift" \ "${WOORL[@]:-woorl}" -s "${DAMSEL}/proto/accounter.thrift" \
"${ACCOUNTER}" Accounter Hold \ "${ACCOUNTER}" Accounter Hold \
"{\"id\": \"${PLANID}\", \"batch\": ${BATCH}}" && \ "{\"id\": \"${PLANID}\", \"batch\": ${BATCH}}" && \
"${WOORL:-woorl}" -s "${DAMSEL}/proto/accounter.thrift" \ "${WOORL[@]:-woorl}" -s "${DAMSEL}/proto/accounter.thrift" \
"${ACCOUNTER}" Accounter RollbackPlan \ "${ACCOUNTER}" Accounter RollbackPlan \
"{\"id\": \"${PLANID}\", \"batch_list\": [${BATCH}]}" "{\"id\": \"${PLANID}\", \"batch_list\": [${BATCH}]}"

View File

@ -30,9 +30,9 @@ BATCH="${2}"
ACCOUNTER="http://${SHUMWAY:-shumway}:8022/accounter" ACCOUNTER="http://${SHUMWAY:-shumway}:8022/accounter"
"${WOORL:-woorl}" -s "${DAMSEL}/proto/accounter.thrift" \ "${WOORL[@]:-woorl}" -s "${DAMSEL}/proto/accounter.thrift" \
"${ACCOUNTER}" Accounter Hold \ "${ACCOUNTER}" Accounter Hold \
"{\"id\": \"${PLANID}\", \"batch\": ${BATCH}}" && \ "{\"id\": \"${PLANID}\", \"batch\": ${BATCH}}" && \
"${WOORL:-woorl}" -s "${DAMSEL}/proto/accounter.thrift" \ "${WOORL[@]:-woorl}" -s "${DAMSEL}/proto/accounter.thrift" \
"${ACCOUNTER}" Accounter CommitPlan \ "${ACCOUNTER}" Accounter CommitPlan \
"{\"id\": \"${PLANID}\", \"batch_list\": [${BATCH}]}" "{\"id\": \"${PLANID}\", \"batch_list\": [${BATCH}]}"

View File

@ -1 +1 @@
WOORL="woorl -v --deadline 30s" WOORL=(woorl -v --deadline 30s)