summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2014-12-13 01:29:57 +0100
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2014-12-13 11:20:29 +0100
commit8c927376a175e641d5b4c04d977ad0bc7a7bf462 (patch)
tree9de1a44e5c3dde28d96b25d5e43671e6ef53d248 /TOOLS
parent8c3dc7334b54a367e9c30dadf265b1f9c9842483 (diff)
downloadmpv-8c927376a175e641d5b4c04d977ad0bc7a7bf462.tar.bz2
mpv-8c927376a175e641d5b4c04d977ad0bc7a7bf462.tar.xz
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.
Diffstat (limited to 'TOOLS')
-rwxr-xr-xTOOLS/osxbundle.py4
1 files changed, 3 insertions, 1 deletions
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()