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 "$@"
|
for var in "$@"
|
||||||
do
|
do
|
||||||
host=${var%:*}
|
# nc does not work with links containing http(s), remove trailing slash
|
||||||
port=${var#*:}
|
clean_link=$(echo "$var" | sed -e "s/^http[s]*:\/\///" | sed 's:/*$::')
|
||||||
|
host=${clean_link%:*}
|
||||||
|
port=${clean_link#*:}
|
||||||
wait_for "$host" "$port"
|
wait_for "$host" "$port"
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user