Allow to install sdks from local file when iot download site is not available
authorSebastien Douheret <sebastien.douheret@iot.bzh>
Thu, 14 Sep 2017 14:21:48 +0000 (16:21 +0200)
committerSebastien Douheret <sebastien.douheret@iot.bzh>
Thu, 14 Sep 2017 14:21:56 +0000 (16:21 +0200)
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
scripts/xds-utils/install-agl-sdks.sh

index f230569..5442552 100755 (executable)
@@ -8,7 +8,8 @@
 # Support only poky_agl profile for now
 PROFILE="poky-agl"
 
-SDKS=$(curl -s ${SDK_BASEURL} | grep -oP  'href="[^"]*.sh"' | cut -d '"' -f 2)
+# Dynamically retreive SDKs (reduce timeout in case of iot website is not available)
+SDKS=$(curl -s ${SDK_BASEURL} --connect-timeout 10 | grep -oP  'href="[^"]*.sh"' | cut -d '"' -f 2) || echo "WARNING: IoT.bzh download site not available."
 
 usage() {
     echo "Usage: $(basename $0) [-h|--help] [-clean] [-f|--file <agl-sdk-filename>] [-a|--arch <arch name>] [-l|--list]"