summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/bb/data.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bb/data.py b/lib/bb/data.py
index db938be1e..99bac9ad3 100644
--- a/lib/bb/data.py
+++ b/lib/bb/data.py
@@ -231,6 +231,7 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False):
# to a shell, we need to escape the quotes in the var
alter = re.sub('"', '\\"', val)
alter = re.sub('\n', ' \\\n', alter)
+ alter = re.sub('\\$', '\\\\$', alter)
o.write('%s="%s"\n' % (varExpanded, alter))
return 0