summaryrefslogtreecommitdiffstats
path: root/build/plugins/cp.py
diff options
context:
space:
mode:
authormonster <[email protected]>2022-07-07 14:41:37 +0300
committermonster <[email protected]>2022-07-07 14:41:37 +0300
commit06e5c21a835c0e923506c4ff27929f34e00761c2 (patch)
tree75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /build/plugins/cp.py
parent03f024c4412e3aa613bb543cf1660176320ba8f4 (diff)
fix ya.make
Diffstat (limited to 'build/plugins/cp.py')
-rw-r--r--build/plugins/cp.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/build/plugins/cp.py b/build/plugins/cp.py
deleted file mode 100644
index 5c663a3bdd9..00000000000
--- a/build/plugins/cp.py
+++ /dev/null
@@ -1,30 +0,0 @@
-import os
-
-from _common import sort_by_keywords
-
-
-def oncopy(unit, *args):
- keywords = {'RESULT': 1, 'KEEP_DIR_STRUCT': 0, 'DESTINATION': 1, 'FROM': 1}
-
- flat_args, spec_args = sort_by_keywords(keywords, args)
-
- dest_dir = spec_args['DESTINATION'][0] if 'DESTINATION' in spec_args else ''
- from_dir = spec_args['FROM'][0] if 'FROM' in spec_args else ''
- keep_struct = 'KEEP_DIR_STRUCT' in spec_args
- save_in_var = 'RESULT' in spec_args
- targets = []
-
- for source in flat_args:
- rel_path = ''
- path_list = source.split(os.sep)
- filename = path_list[-1]
- if keep_struct:
- if path_list[:-1]:
- rel_path = os.path.join(*path_list[:-1])
- source_path = os.path.join(from_dir, rel_path, filename)
- target_path = os.path.join(dest_dir, rel_path, filename)
- if save_in_var:
- targets.append(target_path)
- unit.oncopy_file([source_path, target_path])
- if save_in_var:
- unit.set([spec_args["RESULT"][0], " ".join(targets)])