[ci skip] update generated files
[scons.git] / test / Java / Java-fixture / myrmic.py
blob8934e7f649499739231b999b488e15a90389d027
1 # SPDX-License-Identifier: MIT
3 # Copyright The SCons Foundation
5 import os
6 import sys
8 args = sys.argv[1:]
9 while args:
10 arg = args[0]
11 if arg == '-d':
12 outdir = args[1]
13 args = args[1:]
14 elif arg == '-classpath':
15 args = args[1:]
16 elif arg == '-sourcepath':
17 args = args[1:]
18 else:
19 break
20 args = args[1:]
21 for file in args:
22 out = os.path.join(outdir, file.lower().replace('.java', '.class'))
23 with open(file, 'rb') as infile, open(out, 'wb') as outfile:
24 for line in infile:
25 if not line.startswith(b'/*rmic*/'):
26 outfile.write(line)
28 sys.exit(0)