blob: 8934e7f649499739231b999b488e15a90389d027 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# SPDX-License-Identifier: MIT
#
# Copyright The SCons Foundation
import os
import sys
args = sys.argv[1:]
while args:
arg = args[0]
if arg == '-d':
outdir = args[1]
args = args[1:]
elif arg == '-classpath':
args = args[1:]
elif arg == '-sourcepath':
args = args[1:]
else:
break
args = args[1:]
for file in args:
out = os.path.join(outdir, file.lower().replace('.java', '.class'))
with open(file, 'rb') as infile, open(out, 'wb') as outfile:
for line in infile:
if not line.startswith(b'/*rmic*/'):
outfile.write(line)
sys.exit(0)
|