2018-12-31 14:05:15 +02:00
|
|
|
use crate::executor::RunType;
|
2018-12-15 21:52:21 +02:00
|
|
|
use crate::terminal::print_separator;
|
2020-01-28 16:22:17 +02:00
|
|
|
use crate::utils::require;
|
2019-12-11 23:05:38 +02:00
|
|
|
use anyhow::Result;
|
2018-06-28 12:16:54 +03:00
|
|
|
|
2020-01-28 16:22:17 +02:00
|
|
|
pub fn run_mas(run_type: RunType) -> Result<()> {
|
|
|
|
|
let mas = require("mas")?;
|
|
|
|
|
print_separator("macOS App Store");
|
|
|
|
|
|
|
|
|
|
run_type.execute(mas).arg("upgrade").check_run()
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-11 23:05:38 +02:00
|
|
|
pub fn upgrade_macos(run_type: RunType) -> Result<()> {
|
2020-01-28 16:22:17 +02:00
|
|
|
print_separator("macOS system update");
|
2018-08-19 14:45:23 +03:00
|
|
|
|
2019-03-10 21:48:49 +02:00
|
|
|
run_type
|
|
|
|
|
.execute("softwareupdate")
|
|
|
|
|
.args(&["--install", "--all"])
|
|
|
|
|
.check_run()
|
2018-06-28 12:16:54 +03:00
|
|
|
}
|