summaryrefslogtreecommitdiffstats
path: root/scripts/sdks/agl/_env-init.sh
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-04-04 21:59:45 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-04-05 01:30:31 +0200
commit1775ce4b91aa9c871d510d23a7d037f773d52b09 (patch)
tree7f2b42c385ee2cc72790fb83ce97ed98fb72362c /scripts/sdks/agl/_env-init.sh
parent607fa1dcb03e482415cf70a50fcd094c8bd88c9d (diff)
Rework SDK default directory.
Default SDK directory is $HOME/xds-workspace/.sdks expect if /xdt/sdk exists (backward compatibility). Default SDK directory can be set by defining XDT_SDK variable in /etc/xdtrc file Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'scripts/sdks/agl/_env-init.sh')
-rwxr-xr-xscripts/sdks/agl/_env-init.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/sdks/agl/_env-init.sh b/scripts/sdks/agl/_env-init.sh
index a08f798..921f319 100755
--- a/scripts/sdks/agl/_env-init.sh
+++ b/scripts/sdks/agl/_env-init.sh
@@ -1,6 +1,6 @@
#!/bin/bash
###########################################################################
-# Copyright 2017 IoT.bzh
+# Copyright 2017-2018 IoT.bzh
#
# author: Sebastien Douheret <sebastien@iot.bzh>
#
@@ -19,7 +19,10 @@
[ -f /etc/xdtrc ] && . /etc/xdtrc
-[ -z "$XDT_SDK" ] && XDT_SDK=/xdt/sdk
+if [ -z "$XDT_SDK" ]; then
+ # For backward compatibility and compliance with AGL DevKit docker image
+ [ -d "/xdt/sdk" ] && export XDT_SDK=/xdt/sdk || export XDT_SDK=$HOME/xds-workspace/.sdks
+fi
export SDK_FAMILY_NAME="agl"
export SDK_ROOT_DIR="$XDT_SDK"