From 147fffb7ec757612a0e32e3479f662415f67d87f Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 16 Oct 2017 08:39:59 -0700 Subject: [PATCH] Fix bug where performance-measurements.sh fails hards when given no args Better than "$1: unbound variable", we ran into this when testing this script in the Hush repo, so we are pushing this fix upstream. --- qa/zcash/performance-measurements.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qa/zcash/performance-measurements.sh b/qa/zcash/performance-measurements.sh index 68de22892..fd7b30ffa 100755 --- a/qa/zcash/performance-measurements.sh +++ b/qa/zcash/performance-measurements.sh @@ -154,6 +154,13 @@ EOF xzcat block-107134.tar.xz | tar x -C "$DATADIR/regtest" } + +if [ $# -lt 2 ] +then + echo "$0 : two arguments are required!" + exit 1 +fi + # Precomputation case "$1" in *)