summaryrefslogtreecommitdiffstats
path: root/scripts/sdks/agl/db-dump
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/sdks/agl/db-dump')
-rwxr-xr-xscripts/sdks/agl/db-dump15
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.')