Adds support for 'myrepos' cli tool (#149)
This commit is contained in:
committed by
Roey Darwish Dror
parent
93d3eb2bc3
commit
599fa49260
@@ -88,6 +88,26 @@ pub fn run_pipx_update(run_type: RunType) -> Result<(), Error> {
|
||||
run_type.execute(&pipx).arg("upgrade-all").check_run()
|
||||
}
|
||||
|
||||
pub fn run_myrepos_update(base_dirs: &BaseDirs, run_type: RunType) -> Result<(), Error> {
|
||||
let myrepos = utils::require("mr")?;
|
||||
base_dirs.home_dir().join(".mrconfig").require()?;
|
||||
|
||||
print_separator("myrepos");
|
||||
|
||||
run_type
|
||||
.execute(&myrepos)
|
||||
.arg("--directory")
|
||||
.arg(base_dirs.home_dir())
|
||||
.arg("checkout")
|
||||
.check_run()?;
|
||||
run_type
|
||||
.execute(&myrepos)
|
||||
.arg("--directory")
|
||||
.arg(base_dirs.home_dir())
|
||||
.arg("update")
|
||||
.check_run()
|
||||
}
|
||||
|
||||
pub fn run_custom_command(name: &str, command: &str, run_type: RunType) -> Result<(), Error> {
|
||||
print_separator(name);
|
||||
run_type.execute("sh").arg("-c").arg(command).check_run()
|
||||
|
||||
Reference in New Issue
Block a user