Support pkgin (fix #748)
This commit is contained in:
@@ -98,6 +98,7 @@ pub enum Step {
|
||||
Pipx,
|
||||
Pip3,
|
||||
Pkg,
|
||||
Pkgin,
|
||||
Pnpm,
|
||||
Powershell,
|
||||
Raco,
|
||||
|
||||
@@ -173,6 +173,7 @@ fn run() -> Result<()> {
|
||||
runner.execute(Step::Nix, "nix", || unix::run_nix(&ctx))?;
|
||||
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::Pkgin, "pkgin", || unix::run_pkgin(&ctx))?;
|
||||
}
|
||||
|
||||
#[cfg(target_os = "dragonfly")]
|
||||
|
||||
@@ -100,6 +100,24 @@ pub fn run_oh_my_fish(ctx: &ExecutionContext) -> Result<()> {
|
||||
ctx.run_type().execute(&fish).args(&["-c", "omf update"]).check_run()
|
||||
}
|
||||
|
||||
pub fn run_pkgin(ctx: &ExecutionContext) -> Result<()> {
|
||||
let pkgin = require("pkgin")?;
|
||||
|
||||
let mut command = ctx.run_type().execute(ctx.sudo().as_ref().unwrap());
|
||||
command.arg(&pkgin).arg("update");
|
||||
if ctx.config().yes() {
|
||||
command.arg("-y");
|
||||
}
|
||||
command.check_run()?;
|
||||
|
||||
let mut command = ctx.run_type().execute(ctx.sudo().as_ref().unwrap());
|
||||
command.arg(&pkgin).arg("upgrade");
|
||||
if ctx.config().yes() {
|
||||
command.arg("-y");
|
||||
}
|
||||
command.check_run()
|
||||
}
|
||||
|
||||
pub fn run_fish_plug(ctx: &ExecutionContext) -> Result<()> {
|
||||
let fish = require("fish")?;
|
||||
ctx.base_dirs()
|
||||
|
||||
Reference in New Issue
Block a user