Code Review
/
src
/
xds
/
xds-server.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fixed again freeze when iot.bzh website is not accessible
[src/xds/xds-server.git]
/
scripts
/
xds-utils
/
get-xds-agent.sh
diff --git
a/scripts/xds-utils/get-xds-agent.sh
b/scripts/xds-utils/get-xds-agent.sh
index
0404dac
..
d2f7024
100755
(executable)
--- a/
scripts/xds-utils/get-xds-agent.sh
+++ b/
scripts/xds-utils/get-xds-agent.sh
@@
-5,6
+5,13
@@
[ -z "$XDS_AGENT_BASEURL" ] && XDS_AGENT_BASEURL="http://iot.bzh/download/public/2017/XDS/xds-agent/"
[ -z "$DEST_DIR" ] && DEST_DIR=./webapp/dist/assets/xds-agent-tarballs
[ -z "$XDS_AGENT_BASEURL" ] && XDS_AGENT_BASEURL="http://iot.bzh/download/public/2017/XDS/xds-agent/"
[ -z "$DEST_DIR" ] && DEST_DIR=./webapp/dist/assets/xds-agent-tarballs
+# Fisrt check if we can access to iot.bzh (aka ovh.iot)
+ping -c 1 -W 2 www.ovh.iot > /dev/null
+if [ "$?" != "0" ]; then
+ echo "iot.bzh website not accessible !"
+ exit 1
+fi
+
TARBALLS=$(curl -s ${XDS_AGENT_BASEURL} | grep -oP 'href="[^"]*.zip"' | cut -d '"' -f 2)
usage() {
TARBALLS=$(curl -s ${XDS_AGENT_BASEURL} | grep -oP 'href="[^"]*.zip"' | cut -d '"' -f 2)
usage() {
@@
-39,13
+46,6
@@
if [ ! -d ${DEST_DIR} ]; then
exit 1
fi
exit 1
fi
-# Fisrt check if we can access to iot.bzh (aka ovh.iot)
-ping -c 1 -W 5 www.ovh.iot > /dev/null
-if [ "$?" != "0" ]; then
- echo "iot.bzh website not accessible !"
- exit 1
-fi
-
# Get not existing tarballs
exitCode=0
for file in $TARBALLS; do
# Get not existing tarballs
exitCode=0
for file in $TARBALLS; do