diff options
author | Devtools Arcadia <arcadia-devtools@yandex-team.ru> | 2022-02-07 18:08:42 +0300 |
---|---|---|
committer | Devtools Arcadia <arcadia-devtools@mous.vla.yp-c.yandex.net> | 2022-02-07 18:08:42 +0300 |
commit | 1110808a9d39d4b808aef724c861a2e1a38d2a69 (patch) | |
tree | e26c9fed0de5d9873cce7e00bc214573dc2195b7 /build/scripts/wrap_groovyc.py | |
download | ydb-1110808a9d39d4b808aef724c861a2e1a38d2a69.tar.gz |
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'build/scripts/wrap_groovyc.py')
-rw-r--r-- | build/scripts/wrap_groovyc.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/build/scripts/wrap_groovyc.py b/build/scripts/wrap_groovyc.py new file mode 100644 index 0000000000..068b73fd87 --- /dev/null +++ b/build/scripts/wrap_groovyc.py @@ -0,0 +1,23 @@ +import platform +import sys +import os +import subprocess + + +def fix_windows(args): + for arg in args: + if os.path.basename(arg) == 'groovyc' and os.path.basename(os.path.dirname(arg)) == 'bin': + yield arg + '.bat' + else: + yield arg + + +if __name__ == '__main__': + env = os.environ.copy() + jdk = sys.argv[1] + env['JAVA_HOME'] = jdk + args = sys.argv[2:] + if platform.system() == 'Windows': + sys.exit(subprocess.Popen(list(fix_windows(args)), env=env).wait()) + else: + os.execve(args[0], args, env) |