X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=scripts%2Fsdks%2Fagl%2F_env-init.sh;h=9b92d56c455c0bc4a76df0c8559e3eb04347976d;hb=bfd581e801a38b096adbfa641f2b1f0100872a8a;hp=0f423c48235524c8e7e95d4be7deab5b41c5b579;hpb=f1c182ede3c4aed0d6196d05b0a64ff93372e755;p=src%2Fxds%2Fxds-server.git diff --git a/scripts/sdks/agl/_env-init.sh b/scripts/sdks/agl/_env-init.sh index 0f423c4..9b92d56 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,13 +17,16 @@ # limitations under the License. ########################################################################### -. /etc/xdtrc +[ -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" export SDK_ENV_SETUP_FILENAME="environment-setup-*" export SDK_DATABASE="http://iot.bzh/download/public/XDS/sdk/sdks_latest.json" -[ "$1" = "-print" ] && { env; } +[ "$1" = "-print" ] && ( set -o posix; set | grep '[A-Za-z0-9_]\{1,\}='; )