Support full links in Docker wait script
Remove http(s) and trailing slash. Change-Id: Ia7a471e73ebd23a2005a78d71419b52a9720b6bb
This commit is contained in:
parent
5cfcbda66c
commit
4c077af2f6
@ -42,7 +42,9 @@ wait_for() {
|
||||
|
||||
for var in "$@"
|
||||
do
|
||||
host=${var%:*}
|
||||
port=${var#*:}
|
||||
# nc does not work with links containing http(s), remove trailing slash
|
||||
clean_link=$(echo "$var" | sed -e "s/^http[s]*:\/\///" | sed 's:/*$::')
|
||||
host=${clean_link%:*}
|
||||
port=${clean_link#*:}
|
||||
wait_for "$host" "$port"
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user