committed by
GitHub
parent
2b89f87a37
commit
62a154bc27
@@ -141,7 +141,8 @@ fn run() -> Result<()> {
|
|||||||
{
|
{
|
||||||
if config.should_run(Step::PackageManagers) {
|
if config.should_run(Step::PackageManagers) {
|
||||||
runner.execute("brew", || unix::run_homebrew(config.cleanup(), run_type))?;
|
runner.execute("brew", || unix::run_homebrew(config.cleanup(), run_type))?;
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
runner.execute("MacPorts", || macos::run_macports(&ctx))?;
|
||||||
runner.execute("nix", || unix::run_nix(&ctx))?;
|
runner.execute("nix", || unix::run_nix(&ctx))?;
|
||||||
runner.execute("home-manager", || unix::run_home_manager(run_type))?;
|
runner.execute("home-manager", || unix::run_home_manager(run_type))?;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,25 @@ pub fn run_msupdate(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
ctx.run_type().execute(msupdate).arg("--install").check_run()
|
ctx.run_type().execute(msupdate).arg("--install").check_run()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn run_macports(ctx: &ExecutionContext) -> Result<()> {
|
||||||
|
require("port")?;
|
||||||
|
let sudo = ctx.sudo().as_ref().unwrap();
|
||||||
|
print_separator("MacPorts");
|
||||||
|
ctx.run_type().execute(sudo).args(&["port", "selfupdate"]).check_run()?;
|
||||||
|
ctx.run_type()
|
||||||
|
.execute(sudo)
|
||||||
|
.args(&["port", "-u", "upgrade", "outdated"])
|
||||||
|
.check_run()?;
|
||||||
|
if ctx.config().cleanup() {
|
||||||
|
ctx.run_type()
|
||||||
|
.execute(sudo)
|
||||||
|
.args(&["port", "-N", "reclaim"])
|
||||||
|
.check_run()?;
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
pub fn run_mas(run_type: RunType) -> Result<()> {
|
pub fn run_mas(run_type: RunType) -> Result<()> {
|
||||||
let mas = require("mas")?;
|
let mas = require("mas")?;
|
||||||
print_separator("macOS App Store");
|
print_separator("macOS App Store");
|
||||||
|
|||||||
Reference in New Issue
Block a user