aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-12-22 23:05:20 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-12-23 00:41:58 +0100
commitf2eecfb601acc6c67fb52bf2edda93505bc44da5 (patch)
treec66957356bb6a706b5b6847254a18fdb09906e6a /scripts
parent1ecdc95d837e73509243d436fcafea0920599fbe (diff)
Fixed SDKs management when running in xds VM.v1.0.0-rc2
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/sdks/agl/add2
-rwxr-xr-xscripts/sdks/agl/list7
-rwxr-xr-xscripts/sdks/agl/remove2
-rwxr-xr-xscripts/sdks/agl/update2
4 files changed, 7 insertions, 6 deletions
diff --git a/scripts/sdks/agl/add b/scripts/sdks/agl/add
index dcb3833..e9a9fd1 100755
--- a/scripts/sdks/agl/add
+++ b/scripts/sdks/agl/add
@@ -76,7 +76,7 @@ if [ "$URL" != "" ]; then
TMPDIR=$(mktemp -d)
SDK_FILE=${TMPDIR}/$(basename ${URL})
echo "Downloading $(basename ${SDK_FILE}) ..."
- wget "$URL" -O "${SDK_FILE}" || exit 1
+ wget --no-check-certificate "$URL" -O "${SDK_FILE}" || exit 1
fi
# Retreive default install dir to extract version
diff --git a/scripts/sdks/agl/list b/scripts/sdks/agl/list
index dc748a4..af1d19f 100755
--- a/scripts/sdks/agl/list
+++ b/scripts/sdks/agl/list
@@ -1,4 +1,4 @@
-#! /usr/bin/env node
+#! /usr/bin/env nodejs
/**************************************************************************
* Copyright 2017 IoT.bzh
@@ -39,11 +39,12 @@ const opts = {
};
// Get list of available SDKs
-sdksDBFile = path.join(__dirname, "sdks_latest.json")
+sdksDBFile = path.join(envMap["SDK_ROOT_DIR"], "sdks_latest.json")
try {
// Fetch SDK Json database file when not existing
if (!fs.existsSync(sdksDBFile)) {
- var data = execSync(path.join(__dirname, 'update'), opts);
+
+ var data = execSync(path.join(__dirname, 'update ' + sdksDBFile), opts);
}
// Read SDK Json database file
var data = fs.readFileSync(sdksDBFile);
diff --git a/scripts/sdks/agl/remove b/scripts/sdks/agl/remove
index 99a4022..d0f30b1 100755
--- a/scripts/sdks/agl/remove
+++ b/scripts/sdks/agl/remove
@@ -29,4 +29,4 @@ if [ ! -d "${1}" ]; then
exit 1
fi
-rm -rf "${1}"
+rm -rf "${1}" && echo "SDK successfully removed."
diff --git a/scripts/sdks/agl/update b/scripts/sdks/agl/update
index e59c8fa..a222db9 100755
--- a/scripts/sdks/agl/update
+++ b/scripts/sdks/agl/update
@@ -19,4 +19,4 @@
. $(dirname "$0")/_env-init.sh
-wget -q --connect-timeout=30 ${SDK_DATABASE}
+wget -q --connect-timeout=30 ${SDK_DATABASE} -O $1