X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=scripts%2Fsdks%2Fagl%2F_env-init.sh;h=cc91107eb4a25b5b36683ee7e4c136a1beeccb9d;hb=22ce6ab7f2e7fbf8811d3261c1a72dfd14c70d27;hp=a08f79842f4df7ba5c1160a4ad53d8e47b1a2c66;hpb=8b642497d1cdb08b5f1a68055fd7f2d96b1a3983;p=src%2Fxds%2Fxds-server.git diff --git a/scripts/sdks/agl/_env-init.sh b/scripts/sdks/agl/_env-init.sh index a08f798..cc91107 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 # @@ -17,9 +17,14 @@ # limitations under the License. ########################################################################### -[ -f /etc/xdtrc ] && . /etc/xdtrc +if [ -z "$XDT_SDK" ]; then + [ -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 +fi export SDK_FAMILY_NAME="agl" export SDK_ROOT_DIR="$XDT_SDK"