scons_gd/scons/test/Java/Java-fixture/myjar.py

20 lines
372 B
Python
Raw Normal View History

2022-10-15 16:06:26 +02:00
import fileinput
import sys
args = sys.argv[1:]
while args:
arg = args[0]
if arg == 'cf':
out = args[1]
args = args[1:]
else:
break
args = args[1:]
with open(out, 'wb') as ofp, fileinput.input(files=args, mode='rb') as ifp:
for line in ifp:
if not line.startswith(b'/*jar*/'):
ofp.write(line)
sys.exit(0)