diff --git a/scripts/get-posting-plan-batch.sh b/scripts/get-posting-plan-batch.sh index c206f23..da432a5 100755 --- a/scripts/get-posting-plan-batch.sh +++ b/scripts/get-posting-plan-batch.sh @@ -1,5 +1,9 @@ #!/bin/bash +set -o errexit +set -o pipefail +set -o errtrace + CWD="$(dirname $0)" DAMSEL="${CWD}/../damsel" @@ -29,6 +33,5 @@ BATCHID="${2}" ACCOUNTER="http://${SHUMWAY:-shumway}:8022/accounter" -"${WOORL[@]:-woorl}" -s "${DAMSEL}/proto/accounter.thrift" \ - "${ACCOUNTER}" Accounter GetPlan "\"${PLANID}\"" | \ +"${CWD}/get-posting-plan.sh" "${PLANID}" | \ jq ".batch_list[] | select(.id == ${BATCHID})" diff --git a/scripts/get-posting-plan.sh b/scripts/get-posting-plan.sh new file mode 100755 index 0000000..324fedc --- /dev/null +++ b/scripts/get-posting-plan.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +set -o errexit +set -o pipefail +set -o errtrace + +CWD="$(dirname $0)" +DAMSEL="${CWD}/../damsel" + +USAGE=$(cat <