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
1 changed files with 5 additions and 5 deletions

View File

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