From 607fa1dcb03e482415cf70a50fcd094c8bd88c9d Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Wed, 4 Apr 2018 21:11:07 +0200 Subject: Fixed sdk uuid setting during install [SPEC-1377] Signed-off-by: Sebastien Douheret --- scripts/sdks/agl/add | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'scripts/sdks/agl/add') 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 -- cgit 1.2.3-korg