Skip to content

Commit

Permalink
build: Create clean subcommand to also delete limine clone
Browse files Browse the repository at this point in the history
  • Loading branch information
Lockna committed Aug 20, 2024
1 parent f02f7fa commit cc1a6bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build/xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ SUBCOMMANDS:
fmt Run cargo fmt
clippy Run clippy
lint Run clippy and cargo fmt
clean Cleans the limine clone and runs cargo clean
";

fn main() -> Result<()> {
Expand Down Expand Up @@ -76,6 +77,11 @@ fn main() -> Result<()> {
print!("{}", HELP);
}

Some("clean") => {
cmd!(sh, "rm -rf xernel/kernel/limine").run()?;
cmd!(sh, "cargo clean").run()?;
}

Some(cmd) => bail!("Unknown subcommand: '{}'", cmd),
None => bail!("You must supply a subcommand."),
}
Expand Down

0 comments on commit cc1a6bb

Please sign in to comment.