summaryrefslogtreecommitdiffstats
path: root/test/Java/Java-fixture/myjar.py
blob: 3e172317c51e67379607b760565ddde43dfe5b60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# SPDX-License-Identifier: MIT
#
# Copyright The SCons Foundation

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)