diff options
author | Clément Bénier <clement.benier@iot.bzh> | 2018-10-01 17:18:39 +0200 |
---|---|---|
committer | Clément Bénier <clement.benier@iot.bzh> | 2018-10-03 17:39:10 +0200 |
commit | d99fa4070bbaa4a736f04bd3324e1e13f1a0304c (patch) | |
tree | 3b7b7abc1d4197bc4622c052300d3ee93e0f288b /scripts/sdks/agl | |
parent | 93f163c3043de5e8880ea8638a2edbb21961e03c (diff) |
fix sdks list bug: move rgx into db-dumpflounder_6.0.5flounder_6.0.4flounder_6.0.3flounder_6.0.2flounder_6.0.1flounder/6.0.5flounder/6.0.4flounder/6.0.3flounder/6.0.2flounder/6.0.16.0.56.0.46.0.36.0.26.0.1flounder
cherry-pick from commit ID 512e0a74993b9a5c58e11513725d1c96a7063f37
master
SPEC-1777
only match what defines a variable
remove set because it adds simple quote with special characters
Change-Id: Ib7c13869c9d965c0c0dae1ae69eeeaf446b1ce58
Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
Diffstat (limited to 'scripts/sdks/agl')
-rwxr-xr-x | scripts/sdks/agl/db-dump | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/sdks/agl/db-dump b/scripts/sdks/agl/db-dump index ab6cfd4..e7538d7 100755 --- a/scripts/sdks/agl/db-dump +++ b/scripts/sdks/agl/db-dump @@ -25,6 +25,7 @@ import inspect import fnmatch import argparse import subprocess +import re PARSER = argparse.ArgumentParser( description='Lists available and installed SDKs') @@ -48,11 +49,15 @@ ENV = subprocess.check_output( SDK_ROOT_DIR = None for elt in ENV: - k, v = elt.decode().split('=', 1) - if k == 'SDK_ROOT_DIR': - SDK_ROOT_DIR = v.rstrip('/') - elif k == 'SDK_ENV_SETUP_FILENAME': - SDK_ENV_SETUP_FILENAME = v + #only match what defines a variable + z = re.match(r"^(\w+)=([^']*)$", elt.decode()) + if z: + k = z.group(1) + v = z.group(2) + if k == 'SDK_ROOT_DIR': + SDK_ROOT_DIR = v.rstrip('/') + elif k == 'SDK_ENV_SETUP_FILENAME': + SDK_ENV_SETUP_FILENAME = v if SDK_ROOT_DIR is None: logging.error('No SDK_ROOT_DIR environment variable found.') |