Correct argument amount check

--notor should not be counted in it.
This commit is contained in:
Midgard 2020-09-15 12:17:36 +02:00
parent c25f99e1c8
commit b911a03848
Signed by: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -17,17 +17,17 @@
set -euo pipefail set -euo pipefail
IFS=$'\n' IFS=$'\n'
if [[ $# -lt 3 ]]; then
echo "Usage: $0 [--notor] <workdir> <leader> <follower...>"
exit 1
fi
tor=true tor=true
if [[ "$1" == "--notor" ]]; then if [[ "$1" == "--notor" ]]; then
tor=false tor=false
shift 1 shift 1
fi fi
if [[ $# -lt 3 ]]; then
echo "Usage: $0 [--notor] <workdir> <leader> <follower...>"
exit 1
fi
cd "$1" cd "$1"
leader="$2" leader="$2"