feat: add support for bun (#7)
Authored-by: Matthieu Vion <contact@mvion.fr> Approved-by: Thomas Schönauer <t.schoenauer@hgs-wt.at>
This commit is contained in:
@@ -71,6 +71,7 @@ pub enum Step {
|
|||||||
Atom,
|
Atom,
|
||||||
BrewCask,
|
BrewCask,
|
||||||
BrewFormula,
|
BrewFormula,
|
||||||
|
Bun,
|
||||||
Bin,
|
Bin,
|
||||||
Cargo,
|
Cargo,
|
||||||
Chezmoi,
|
Chezmoi,
|
||||||
|
|||||||
@@ -196,6 +196,7 @@ fn run() -> Result<()> {
|
|||||||
runner.execute(Step::HomeManager, "home-manager", || unix::run_home_manager(run_type))?;
|
runner.execute(Step::HomeManager, "home-manager", || unix::run_home_manager(run_type))?;
|
||||||
runner.execute(Step::Asdf, "asdf", || unix::run_asdf(run_type))?;
|
runner.execute(Step::Asdf, "asdf", || unix::run_asdf(run_type))?;
|
||||||
runner.execute(Step::Pkgin, "pkgin", || unix::run_pkgin(&ctx))?;
|
runner.execute(Step::Pkgin, "pkgin", || unix::run_pkgin(&ctx))?;
|
||||||
|
runner.execute(Step::Bun, "bun", || unix::run_bun(&ctx))?;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "dragonfly")]
|
#[cfg(target_os = "dragonfly")]
|
||||||
|
|||||||
0
src/steps/bun.rs
Normal file
0
src/steps/bun.rs
Normal file
@@ -409,6 +409,14 @@ pub fn run_sdkman(base_dirs: &BaseDirs, cleanup: bool, run_type: RunType) -> Res
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn run_bun(ctx: &ExecutionContext) -> Result<()> {
|
||||||
|
let bun = require("bun")?;
|
||||||
|
|
||||||
|
print_separator("Bun");
|
||||||
|
|
||||||
|
ctx.run_type().execute(&bun).arg("upgrade").check_run()
|
||||||
|
}
|
||||||
|
|
||||||
pub fn reboot() {
|
pub fn reboot() {
|
||||||
print!("Rebooting...");
|
print!("Rebooting...");
|
||||||
Command::new("sudo").arg("reboot").spawn().unwrap().wait().unwrap();
|
Command::new("sudo").arg("reboot").spawn().unwrap().wait().unwrap();
|
||||||
|
|||||||
Reference in New Issue
Block a user