Files
swift-mirror/test/Serialization/Inputs/binary_sub.py
Jordan Rose 7926cfdd96 [test] Fix serialization test for incompatible targets.
Rather than use pre-generated swiftmodule files, generate an empty module
and then replace the target triple embedded in it. This unfortunately
necessitates an external script beacuse typical command-line tools are not
meant for operating on binary files.

Swift SVN r24556
2015-01-20 18:36:11 +00:00

10 lines
155 B
Python
Executable File

#!/usr/bin/env python
import sys
(_, old, new) = sys.argv
assert(len(old) == len(new))
data = sys.stdin.read()
sys.stdout.write(data.replace(old, new))