aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/sdks/agl/add
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-04-04 21:11:07 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-04-05 01:30:31 +0200
commit607fa1dcb03e482415cf70a50fcd094c8bd88c9d (patch)
tree567b0e2dbe5ec5dd7668b668b30c71e2a6091e3e /scripts/sdks/agl/add
parent4a199b578b3bdfca70cdbb1ecd399fda90116087 (diff)
Fixed sdk uuid setting during install [SPEC-1377]
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'scripts/sdks/agl/add')
-rwxr-xr-xscripts/sdks/agl/add15
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/sdks/agl/add b/scripts/sdks/agl/add
index 80a0487..839d647 100755
--- a/scripts/sdks/agl/add
+++ b/scripts/sdks/agl/add
@@ -29,6 +29,7 @@ TMPDIR=""
SDK_FILE=""
URL=""
DEBUG_OPT=""
+UUID=""
do_cleanup=true
do_force=false
while [ $# -ne 0 ]; do
@@ -48,6 +49,10 @@ while [ $# -ne 0 ]; do
shift
URL=$1
;;
+ --uuid)
+ shift
+ UUID=$1
+ ;;
-no-clean)
do_cleanup=false
;;
@@ -85,8 +90,16 @@ if [ "$URL" != "" ]; then
wget --no-check-certificate "$URL" -O "${SDK_FILE}" || exit 1
fi
+# Compute uuid when needed
+if [ "$UUID" = "" ] && [ "$URL" != "" ]; then
+ UUID=$(echo "$URL" | md5sum |cut -d' ' -f1)
+else
+ echo "UUID value must be specify using --uuid option."
+ exit 1
+fi
+
# Retreive SDK info
-sdkNfo=$(${SCRIPTS_DIR}/get-sdk-info --file "${SDK_FILE}")
+sdkNfo=$(${SCRIPTS_DIR}/get-sdk-info --file "${SDK_FILE}" --uuid "${UUID}")
if [ "$?" != "0" ]; then
echo "$sdkNfo"
exit 1