From 8c927376a175e641d5b4c04d977ad0bc7a7bf462 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Sat, 13 Dec 2014 01:29:57 +0100 Subject: osxbundle: don't use sed but pure python GNU sed and BSD sed don't share the same options for editing files in-place, so a workaround is needed. The most simple way is to use a pure python implementation of applying the changes. --- TOOLS/osxbundle.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'TOOLS') diff --git a/TOOLS/osxbundle.py b/TOOLS/osxbundle.py index 3053fec7b0..b2695e194d 100755 --- a/TOOLS/osxbundle.py +++ b/TOOLS/osxbundle.py @@ -3,6 +3,7 @@ import os import shutil import sys +import fileinput from optparse import OptionParser def sh(command): @@ -35,7 +36,8 @@ def copy_binary(binary_name): shutil.copy(binary_name, target_binary(binary_name)) def apply_plist_template(plist_file, version): - sh("sed -i -e 's/${VERSION}/%s/g' %s" % (version, plist_file)) + for line in fileinput.input(plist_file, inplace=1): + print (line.rstrip().replace('${VERSION}', version)) def main(): version = sh("./version.sh --print").strip() -- cgit v1.2.3