diff options
author | alexv-smirnov <alex@ydb.tech> | 2023-06-13 11:05:01 +0300 |
---|---|---|
committer | alexv-smirnov <alex@ydb.tech> | 2023-06-13 11:05:01 +0300 |
commit | bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0 (patch) | |
tree | 1d1df72c0541a59a81439842f46d95396d3e7189 /build/scripts/fetch_from_archive.py | |
parent | 8bfdfa9a9bd19bddbc58d888e180fbd1218681be (diff) | |
download | ydb-bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0.tar.gz |
add ymake export to ydb
Diffstat (limited to 'build/scripts/fetch_from_archive.py')
-rw-r--r-- | build/scripts/fetch_from_archive.py | 36 |
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) |