summaryrefslogtreecommitdiffstats
path: root/scripts/sdks/agl/db-dump
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/db-dump
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/db-dump')
-rwxr-xr-xscripts/sdks/agl/db-dump9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/sdks/agl/db-dump b/scripts/sdks/agl/db-dump
index 5c040ea..379be3e 100755
--- a/scripts/sdks/agl/db-dump
+++ b/scripts/sdks/agl/db-dump
@@ -49,7 +49,7 @@ ENV = subprocess.check_output(
for elt in ENV:
k, v = elt.split('=', 1)
if k == 'SDK_ROOT_DIR':
- SDK_ROOT_DIR = v
+ SDK_ROOT_DIR = v.rstrip('/')
elif k == 'SDK_ENV_SETUP_FILENAME':
SDK_ENV_SETUP_FILENAME = v
@@ -96,9 +96,10 @@ for root, dirs, files in os.walk(SDK_ROOT_DIR):
for one_sdk in INSTALLED_SDK:
logging.debug("Processing %s", one_sdk['ENV_FILE'])
- PROFILE = one_sdk['ENV_FILE'].split('/')[3]
- VERSION = one_sdk['ENV_FILE'].split('/')[4]
- ARCH = one_sdk['ENV_FILE'].split('/')[5]
+ envFile = one_sdk['ENV_FILE'].split(SDK_ROOT_DIR+'/')[1]
+ PROFILE = envFile.split('/')[0]
+ VERSION = envFile.split('/')[1]
+ ARCH = envFile.split('/')[2]
DIR = os.path.dirname(one_sdk['ENV_FILE'])
if PROFILE == '' or VERSION == '' or ARCH == '' or DIR == '':
logging.debug('Path not compliant, skipping')