mirror of
https://github.com/mozilla/cipherscan.git
synced 2024-11-16 11:53:43 +01:00
Merge pull request #102 from floatingatoll/negative-nope
workaround bash 4.2- not having unset A[-1] support
This commit is contained in:
commit
5a10991008
@ -1915,8 +1915,9 @@ if (( $# < 1 )); then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
PARAMS=("$@")
|
PARAMS=("$@")
|
||||||
TARGET=${PARAMS[-1]}
|
last_element="$(( $# - 1 ))"
|
||||||
unset PARAMS[-1]
|
TARGET=${PARAMS[$last_element]}
|
||||||
|
unset PARAMS[$last_element]
|
||||||
|
|
||||||
# Refuse to proceed if the hostname starts with a hyphen, since hostnames can't
|
# Refuse to proceed if the hostname starts with a hyphen, since hostnames can't
|
||||||
# begin with a hyphen and this likely means we accidentally parsed an option as
|
# begin with a hyphen and this likely means we accidentally parsed an option as
|
||||||
|
Loading…
Reference in New Issue
Block a user