summaryrefslogtreecommitdiff
path: root/scripts/hash.sh
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2020-01-03 10:44:35 -0800
committerMichael Forney <mforney@mforney.org>2020-01-03 10:53:34 -0800
commit24c94be90c99adbcf4a67e5d7aa9b360cae9af4b (patch)
tree34bd7e101942c04ffdcb82e72a5755b740ce221f /scripts/hash.sh
parent1febbd87d76770808bf8ea9adcbead6de77b0a0e (diff)
scripts: Check that we got the right number of parameters
Diffstat (limited to 'scripts/hash.sh')
-rw-r--r--scripts/hash.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/hash.sh b/scripts/hash.sh
index 15861d27..6e2c4462 100644
--- a/scripts/hash.sh
+++ b/scripts/hash.sh
@@ -1,5 +1,10 @@
set -e
+if [ "$#" != 4 ] ; then
+ echo 'usage: hash.sh repo mode name file' >&2
+ exit 2
+fi
+
repo=$1
mode=$2
name=$3