diff options
| author | Michael Forney <mforney@mforney.org> | 2020-01-03 10:44:35 -0800 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2020-01-03 10:53:34 -0800 |
| commit | 24c94be90c99adbcf4a67e5d7aa9b360cae9af4b (patch) | |
| tree | 34bd7e101942c04ffdcb82e72a5755b740ce221f /scripts | |
| parent | 1febbd87d76770808bf8ea9adcbead6de77b0a0e (diff) | |
scripts: Check that we got the right number of parameters
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/commit.sh | 5 | ||||
| -rw-r--r-- | scripts/hash.sh | 5 | ||||
| -rw-r--r-- | scripts/probe-size.sh | 5 | ||||
| -rw-r--r-- | scripts/probe.sh | 5 | ||||
| -rw-r--r-- | scripts/tree.sh | 5 |
5 files changed, 25 insertions, 0 deletions
diff --git a/scripts/commit.sh b/scripts/commit.sh index b2798b3b..1d4124a7 100644 --- a/scripts/commit.sh +++ b/scripts/commit.sh @@ -1,5 +1,10 @@ set -e +if [ "$#" != 4 ] ; then + echo 'usage: commit.sh repo branch tag out' >&2 + exit 2 +fi + repo=$1 branch=$2 tag=$3 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 diff --git a/scripts/probe-size.sh b/scripts/probe-size.sh index eabfe3b9..ff671ef0 100644 --- a/scripts/probe-size.sh +++ b/scripts/probe-size.sh @@ -1,5 +1,10 @@ set -e +if [ "$#" -lt 2 ] ; then + echo 'usage: probe-size.sh var command...' >&2 + exit 2 +fi + var=$1 shift for size in 8 4 2 1 ; do diff --git a/scripts/probe.sh b/scripts/probe.sh index 70867cdb..093a16dc 100644 --- a/scripts/probe.sh +++ b/scripts/probe.sh @@ -1,5 +1,10 @@ set -e +if [ "$#" -lt 2 ] ; then + echo 'usage: probe.sh var command...' >&2 + exit 2 +fi + var=$1 shift if "$@" 2>/dev/null ; then diff --git a/scripts/tree.sh b/scripts/tree.sh index 15ae6991..204f1c1b 100644 --- a/scripts/tree.sh +++ b/scripts/tree.sh @@ -1,5 +1,10 @@ set -e +if [ "$#" != 4 ] ; then + echo 'usage: commit.sh repo tag index out' >&2 + exit 2 +fi + repo=$1 tag=$2 index=$3 |
