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/perl_wrapper.py | |
download | ydb-1110808a9d39d4b808aef724c861a2e1a38d2a69.tar.gz |
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'build/scripts/perl_wrapper.py')
-rw-r--r-- | build/scripts/perl_wrapper.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/build/scripts/perl_wrapper.py b/build/scripts/perl_wrapper.py new file mode 100644 index 0000000000..cb4027f1d3 --- /dev/null +++ b/build/scripts/perl_wrapper.py @@ -0,0 +1,24 @@ +import os +import sys +import shutil + +if __name__ == '__main__': + path = sys.argv[1] + to = sys.argv[-1] + fr = sys.argv[-2] + to_dir = os.path.dirname(to) + + os.chdir(to_dir) + + f1 = os.path.basename(fr) + fr_ = os.path.dirname(fr) + f2 = os.path.basename(fr_) + fr_ = os.path.dirname(fr_) + + os.makedirs(f2) + shutil.copyfile(fr, os.path.join(f2, f1)) + + if path[0] != '/': + path = os.path.join(os.path.dirname(__file__), path) + + os.execv(path, [path] + sys.argv[2:]) |