aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/bundle.py
diff options
context:
space:
mode:
Diffstat (limited to 'compiler_wrapper/bundle.py')
-rwxr-xr-xcompiler_wrapper/bundle.py19
1 files changed, 2 insertions, 17 deletions
diff --git a/compiler_wrapper/bundle.py b/compiler_wrapper/bundle.py
index 6df82146..173625f4 100755
--- a/compiler_wrapper/bundle.py
+++ b/compiler_wrapper/bundle.py
@@ -18,25 +18,14 @@ import sys
def parse_args():
parser = argparse.ArgumentParser()
- default_output_dir = os.path.normpath(
- os.path.join(
- os.path.dirname(os.path.realpath(__file__)),
- '../../chromiumos-overlay/sys-devel/llvm/files/compiler_wrapper'))
- parser.add_argument(
- '--output_dir',
- default=default_output_dir,
- help='Output directory to place bundled files (default: %(default)s)')
- parser.add_argument(
- '--create',
- action='store_true',
- help='Create output_dir if it does not already exist')
+ parser.add_argument('output_dir')
return parser.parse_args()
def copy_files(input_dir, output_dir):
for filename in os.listdir(input_dir):
if ((filename.endswith('.go') and not filename.endswith('_test.go')) or
- filename in ('build.py', 'go.mod')):
+ filename == 'build.py'):
shutil.copy(
os.path.join(input_dir, filename), os.path.join(output_dir, filename))
@@ -68,10 +57,6 @@ def main():
args = parse_args()
input_dir = os.path.dirname(__file__)
change_id = read_change_id(input_dir)
- if not args.create:
- assert os.path.exists(
- args.output_dir
- ), f'Specified output directory ({args.output_dir}) does not exist'
shutil.rmtree(args.output_dir, ignore_errors=True)
os.makedirs(args.output_dir)
copy_files(input_dir, args.output_dir)