diff options
author | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2018-11-06 12:17:30 +0100 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2018-11-06 15:43:21 +0100 |
commit | 22ce6ab7f2e7fbf8811d3261c1a72dfd14c70d27 (patch) | |
tree | 6f1a1899f749bfbe9ced5d6146fd9ed7a507e729 | |
parent | 24581d461e7c9b87836384cd4c38cb2bd7147459 (diff) |
Allow XDT_SDK overwrite
Test framework or simply a user may need to set XDT_SDK variable even
if /etc/xdtrc file exists.
Also change default location of webapp to www to allow to run xds-server
without the need to set any config file.
Change-Id: I403778e597cbcfd2c16d5ab6b603073ed3a230f0
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
-rw-r--r-- | lib/xdsconfig/config.go | 2 | ||||
-rwxr-xr-x | scripts/sdks/agl/_env-init.sh | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/lib/xdsconfig/config.go b/lib/xdsconfig/config.go index bab3abd..046950d 100644 --- a/lib/xdsconfig/config.go +++ b/lib/xdsconfig/config.go @@ -100,7 +100,7 @@ func Init(cliCtx *cli.Context, log *logrus.Logger) (*Config, error) { NoFolderConfig: cliCtx.GlobalBool("no-folderconfig"), }, FileConf: FileConfig{ - WebAppDir: "webapp/dist", + WebAppDir: "www", ShareRootDir: dfltShareDir, SdkScriptsDir: DefaultSdkScriptsDir, XdsUtilsScriptsDir: DefaultXdsUtilsScriptsDir, diff --git a/scripts/sdks/agl/_env-init.sh b/scripts/sdks/agl/_env-init.sh index 9d4b398..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" ] && { env; }
\ No newline at end of file +[ "$1" = "-print" ] && { env; } |