Commit f71c96ad authored by Jérome Perrin's avatar Jérome Perrin

component/firefox: use .format string subsitutions

so that we don't have to escape % as %%
parent 654ac2e1
...@@ -37,11 +37,11 @@ script = ...@@ -37,11 +37,11 @@ script =
part = self.buildout[os.path.basename(firefox)] part = self.buildout[os.path.basename(firefox)]
with open(%(location)r, 'w') as f: with open(%(location)r, 'w') as f:
f.write("""#!/bin/sh -e f.write("""#!/bin/sh -e
cd %%s cd {}
export LD_LIBRARY_PATH=$PWD:%%s export LD_LIBRARY_PATH=$PWD:{}
export PATH=%%s:$PATH export PATH={}:$PATH
exec ./firefox "$@" 2>/dev/null exec ./firefox "$@" 2>/dev/null
""" %% ( """.format(
firefox, firefox,
':'.join(part['library'].split()), ':'.join(part['library'].split()),
':'.join(part['path'].split()), ':'.join(part['path'].split()),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment