summaryrefslogtreecommitdiffstats
path: root/scripts/sdks/agl/add
diff options
context:
space:
mode:
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