summaryrefslogtreecommitdiffstats
path: root/build/scripts/fix_java_command_file_cp.py
diff options
context:
space:
mode:
authormonster <[email protected]>2022-07-07 14:41:37 +0300
committermonster <[email protected]>2022-07-07 14:41:37 +0300
commit06e5c21a835c0e923506c4ff27929f34e00761c2 (patch)
tree75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /build/scripts/fix_java_command_file_cp.py
parent03f024c4412e3aa613bb543cf1660176320ba8f4 (diff)
fix ya.make
Diffstat (limited to 'build/scripts/fix_java_command_file_cp.py')
-rw-r--r--build/scripts/fix_java_command_file_cp.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/build/scripts/fix_java_command_file_cp.py b/build/scripts/fix_java_command_file_cp.py
deleted file mode 100644
index fc87048c327..00000000000
--- a/build/scripts/fix_java_command_file_cp.py
+++ /dev/null
@@ -1,34 +0,0 @@
-import sys
-import os
-import argparse
-import subprocess
-import platform
-
-
-def fix_files(args):
- args = args[:]
- parser = argparse.ArgumentParser()
- parser.add_argument('--build-root', default=None)
- args, tail = parser.parse_known_args(args)
- for idx, arg in list(enumerate(tail)):
- if arg.startswith('@') and os.path.isfile(arg[1:]):
- with open(arg[1:]) as f:
- fixed = [i.strip() for i in f]
- if args.build_root:
- fixed = [os.path.join(args.build_root, i) for ln in fixed for i in ln.split(os.path.pathsep)]
- fixed = os.pathsep.join([i.strip() for i in fixed])
- fixed_name = list(os.path.splitext(arg))
- fixed_name[0] += '_fixed'
- fixed_name = ''.join(fixed_name)
- with open(fixed_name[1:], 'w') as f:
- f.write(fixed)
- tail[idx:idx + 1] = [fixed_name]
- return tail
-
-
-if __name__ == '__main__':
- args = fix_files(sys.argv[1:])
- if platform.system() == 'Windows':
- sys.exit(subprocess.Popen(args).wait())
- else:
- os.execv(args[0], args)