Skip to content

[Bazel] Allow the overlay to contain new directories #126759

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions utils/bazel/overlay_directories.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,15 @@ def main(args):
os.path.join(args.overlay, relpath), os.path.join(args.target, relpath)
)

for src_entry in os.listdir(os.path.join(args.src, rel_root)):
if src_entry not in dirs:
relpath = os.path.join(rel_root, src_entry)
_symlink_abs(
os.path.join(args.src, relpath), os.path.join(args.target, relpath)
)
src_path = os.path.join(args.src, rel_root)
if os.path.isdir(src_path):
for src_entry in os.listdir(src_path):
if src_entry not in dirs:
relpath = os.path.join(rel_root, src_entry)
_symlink_abs(
os.path.join(args.src, relpath),
os.path.join(args.target, relpath),
)


if __name__ == "__main__":
Expand Down