aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/sdks
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/sdks')
-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