Make This is little more hacky

This commit is contained in:
Michael Vines 2018-09-05 08:08:36 -07:00
parent 0362169671
commit 1c874fbc1b
1 changed files with 6 additions and 2 deletions

View File

@ -18,9 +18,13 @@ usage() {
exit 1
}
# this is a little hacky
# This is a little hacky
if [[ ${1:0:2} != "--" ]]; then
read -r _ leader_address shift < <(find_leader "${@:1:1}")
if [[ ${2:0:2} != "--" ]]; then
read -r _ leader_address shift < <(find_leader "${@:1:2}")
else
read -r _ leader_address shift < <(find_leader "${@:1:1}")
fi
else
read -r _ leader_address shift < <(find_leader)
fi