aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/fetch_from_archive.py
diff options
context:
space:
mode:
authoralexv-smirnov <alex@ydb.tech>2023-03-15 19:59:12 +0300
committeralexv-smirnov <alex@ydb.tech>2023-03-15 19:59:12 +0300
commit056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11 (patch)
tree4740980126f32e3af7937ba0ca5f83e59baa4ab0 /build/scripts/fetch_from_archive.py
parent269126dcced1cc8b53eb4398b4a33e5142f10290 (diff)
downloadydb-056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11.tar.gz
add library/cpp/actors, ymake build to ydb oss export
Diffstat (limited to 'build/scripts/fetch_from_archive.py')
-rw-r--r--build/scripts/fetch_from_archive.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/build/scripts/fetch_from_archive.py b/build/scripts/fetch_from_archive.py
new file mode 100644
index 0000000000..57aff91b5e
--- /dev/null
+++ b/build/scripts/fetch_from_archive.py
@@ -0,0 +1,36 @@
+import os
+import sys
+import logging
+import argparse
+
+import fetch_from
+
+
+def parse_args():
+ parser = argparse.ArgumentParser()
+ fetch_from.add_common_arguments(parser)
+ parser.add_argument('--file-name', required=True)
+ parser.add_argument('--archive', required=True)
+
+ return parser.parse_args()
+
+def main(args):
+ archive = args.archive
+ file_name = args.file_name.rstrip('-')
+
+ fetch_from.process(archive, file_name, args, remove=False)
+
+
+if __name__ == '__main__':
+ args = parse_args()
+ fetch_from.setup_logging(args, os.path.basename(__file__))
+
+ try:
+ main(args)
+ except Exception as e:
+ logging.exception(e)
+ print >>sys.stderr, open(args.abs_log_path).read()
+ sys.stderr.flush()
+
+ import error
+ sys.exit(error.ExitCodes.INFRASTRUCTURE_ERROR if fetch_from.is_temporary(e) else 1)