From 76d193a5575c09b5d95870bc002715f25a802ed4 Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Mon, 21 Jul 2014 16:48:58 +0200 Subject: [PATCH] For some reason quotes are needed on Linux --- etc/getVariables.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/etc/getVariables.py b/etc/getVariables.py index c9f359999..b8ad0b0d8 100755 --- a/etc/getVariables.py +++ b/etc/getVariables.py @@ -89,8 +89,8 @@ destShell=sys.argv[1] additional=sys.argv[2:] if verbose: - print("Target shell",destShell) - print("Additional settings:",additional) + printDebug("Target shell",destShell) + printDebug("Additional settings:",additional) # Certain bashrc-s fail if these are set for v in ["FOAM_INST_DIR", @@ -229,7 +229,10 @@ class BashConvert(ShellConvert): val=":".join(v) else: val=v - return 'export %s=%s' % (n,val) + if val.find(" "): + return 'export %s="%s"' % (n,val) + else: + return 'export %s=%s' % (n,val) def toAlias(self,n,v): return "alias %s='%s'" % (n,v)