diff options
| author | alexv-smirnov <[email protected]> | 2023-03-15 19:59:12 +0300 | 
|---|---|---|
| committer | alexv-smirnov <[email protected]> | 2023-03-15 19:59:12 +0300 | 
| commit | 056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11 (patch) | |
| tree | 4740980126f32e3af7937ba0ca5f83e59baa4ab0 /build/scripts/find_and_tar.py | |
| parent | 269126dcced1cc8b53eb4398b4a33e5142f10290 (diff) | |
add library/cpp/actors, ymake build to ydb oss export
Diffstat (limited to 'build/scripts/find_and_tar.py')
| -rw-r--r-- | build/scripts/find_and_tar.py | 22 | 
1 files changed, 22 insertions, 0 deletions
diff --git a/build/scripts/find_and_tar.py b/build/scripts/find_and_tar.py new file mode 100644 index 00000000000..f251623c68c --- /dev/null +++ b/build/scripts/find_and_tar.py @@ -0,0 +1,22 @@ +import os +import sys +import tarfile + + +def find_gcno(dirname, tail): +    for cur, _dirs, files in os.walk(dirname): +        for f in files: +            if f.endswith(tail): +                yield os.path.relpath(os.path.join(cur, f)) + + +def main(args): +    output = args[0] +    tail = args[1] if len(args) > 1 else '' +    with tarfile.open(output, 'w:') as tf: +        for f in find_gcno(os.getcwd(), tail): +            tf.add(f) + + +if __name__ == '__main__': +    main(sys.argv[1:])  | 
