summaryrefslogtreecommitdiffstats
path: root/test/Java/Java-fixture/myjar.py
blob: a47e3b07e3569c275e500e391a0235317773c761 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)