Commit 24c6c563 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 433bd38b
...@@ -29,11 +29,11 @@ script = ...@@ -29,11 +29,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