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=9b92d56c455c0bc4a76df0c8559e3eb04347976d;hpb=bfd581e801a38b096adbfa641f2b1f0100872a8a;p=src%2Fxds%2Fxds-server.git diff --git a/scripts/sdks/agl/_env-init.sh b/scripts/sdks/agl/_env-init.sh index 9b92d56..cc91107 100755 --- a/scripts/sdks/agl/_env-init.sh +++ b/scripts/sdks/agl/_env-init.sh @@ -17,11 +17,13 @@ # limitations under the License. ########################################################################### -[ -f /etc/xdtrc ] && . /etc/xdtrc - 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 + [ -f /etc/xdtrc ] && . /etc/xdtrc + + 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" @@ -29,4 +31,4 @@ 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" ] && ( set -o posix; set | grep '[A-Za-z0-9_]\{1,\}='; ) +[ "$1" = "-print" ] && { env; }