patchupdate.py: Ensure that patchlist data is properly escaped.

This commit is contained in:
Sebastian Lackner
2014-07-26 04:39:21 +02:00
parent 2f48baf75b
commit 7b41f47a27
2 changed files with 34 additions and 34 deletions

View File

@ -431,9 +431,9 @@ def generate_makefile(all_patches, fp):
fp.write("\t( \\\n")
for info in patch.authors:
if not info.subject: continue
s = info.subject
s = info.subject.replace("\\", "\\\\\\\\").replace("\"", "\\\\\"")
if info.revision and info.revision != "1": s += " [rev %s]" % info.revision
fp.write("\t\techo \"+ { \\\"%s\\\", \\\"%s\\\", \\\"%s\\\" },\"; \\\n" % (patch.name, info.author, s))
fp.write("\t\techo '+ { \"%s\", \"%s\", \"%s\" },'; \\\n" % (patch.name, info.author, s))
fp.write("\t) > %s.ok\n" % patch.name)
else:
fp.write("\ttouch %s.ok\n" % patch.name)