rel = p.relative_to(context.root)
if (context.root / output).is_dir():
- # The ESP wants .efi files, not .efi.signed or .efi.signed.latest
- if rel.suffix and rel.suffix != ".efi":
- left_stem, _ = rel.name.split(".", maxsplit=1)
- rel = rel.with_name(f"{left_stem}.efi")
output /= rel.name
+ # The ESP wants .efi files, not .efi.signed or .efi.signed.latest
+ if output.suffix and output.suffix != ".efi":
+ left_stem, _ = output.name.split(".", maxsplit=1)
+ output = output.with_name(f"{left_stem}.efi")
log_step(f"Installing signed {name} EFI binary from /{rel} to /{output}")
shutil.copy2(p, context.root / output)