Skip to content

Commit 9f8bb2b

Browse files
committed
Add copy-to-boot cli cmd
1 parent d2f206e commit 9f8bb2b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/cli/bootupd.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ pub enum DVerb {
3535
GenerateUpdateMetadata(GenerateOpts),
3636
#[clap(name = "install", about = "Install components")]
3737
Install(InstallOpts),
38+
#[clap(
39+
name = "copy-to-boot",
40+
about = "Copy bootloader files from /usr/lib/efi to boot/ESP (package mode)"
41+
)]
42+
CopyToBoot,
3843
}
3944

4045
#[derive(Debug, Parser)]
@@ -88,6 +93,7 @@ impl DCommand {
8893
match self.cmd {
8994
DVerb::Install(opts) => Self::run_install(opts),
9095
DVerb::GenerateUpdateMetadata(opts) => Self::run_generate_meta(opts),
96+
DVerb::CopyToBoot => Self::run_copy_to_boot(),
9197
}
9298
}
9399

@@ -122,4 +128,9 @@ impl DCommand {
122128
.context("boot data installation failed")?;
123129
Ok(())
124130
}
131+
132+
pub(crate) fn run_copy_to_boot() -> Result<()> {
133+
bootupd::copy_to_boot().context("copying to boot failed")?;
134+
Ok(())
135+
}
125136
}

0 commit comments

Comments
 (0)