summaryrefslogtreecommitdiffstats
path: root/scripts/sdks/agl/get-sdk-info
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-02-08 16:49:02 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-02-08 16:49:02 +0100
commite97eebc18d726aa55738d7e19513491cf58a6e3a (patch)
tree1e668dadc73cbe710cb1aaf059b43ef91defa01f /scripts/sdks/agl/get-sdk-info
parent0a53346ecd92e1281587c724631fdf76dc756fc7 (diff)
Avoid duplicate SDK install dir - SPEC-1252
- install sdk in a directory that includes a unique id (built from install url or path). SDKs are now install under: <SDK_ROOT_DIR>/<PROFILE>/<VERSION>/<ARCH>/<UID> Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'scripts/sdks/agl/get-sdk-info')
-rwxr-xr-xscripts/sdks/agl/get-sdk-info8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/sdks/agl/get-sdk-info b/scripts/sdks/agl/get-sdk-info
index 19bf685..8840bf0 100755
--- a/scripts/sdks/agl/get-sdk-info
+++ b/scripts/sdks/agl/get-sdk-info
@@ -113,14 +113,18 @@ fi
profile=$(echo "${filename}" | sed -r 's/(.*)-glibc.*/\1/')
version=$(echo "${filename}" | sed -r 's/.*toolchain-(.*).sh/\1/')
arch=$(echo "${filename}" | sed -r 's/.*crosssdk-(.*)-toolchain.*/\1/')
-installPath=${SDK_ROOT_DIR}/${profile}/${version}/${arch}
[ "${profile}" = "" ] && { echo "profile not set"; exit 7; }
[ "${version}" = "" ] && { echo "version not set"; exit 8; }
[ "${arch}" = "" ] && { echo " arch not set"; exit 9; }
+# Define a unique ID to be able to distinguish for example corei7-64 from qemux86-64
+uuid=$(echo "${sdkUrl}" | md5sum |cut -d' ' -f1)
+
+installPath=${SDK_ROOT_DIR}/${profile}/${version}/${arch}/${uuid}
+
status="Not Installed"
-if [ -d ${installPath} ]; then
+if [ -d "${installPath}" ]; then
envFile=$(find "${installPath}" -maxdepth 1 -name "${SDK_ENV_SETUP_FILENAME}")
[ "${envFile}" != "" ] && status="Installed"
fi