Skip to content

Commit

Permalink
Added Protonup support requested in issue#1021 (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
s34m authored Oct 14, 2022
2 parents 732d83e + b2c9c74 commit 7b52281
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ pub enum Step {
Pkg,
Pkgin,
Powershell,
Protonup,
Raco,
Remotes,
Restarts,
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ fn run() -> Result<()> {
runner.execute(Step::Snap, "snap", || linux::run_snap(sudo.as_ref(), run_type))?;
runner.execute(Step::Pacstall, "pacstall", || linux::run_pacstall(&ctx))?;
runner.execute(Step::Pacdef, "pacdef", || linux::run_pacdef(&ctx))?;
runner.execute(Step::Protonup, "protonup", || linux::run_protonup_update(&ctx))?;
}

if let Some(commands) = config.commands() {
Expand Down
9 changes: 9 additions & 0 deletions src/steps/os/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,15 @@ pub fn run_pihole_update(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()
run_type.execute(sudo).arg(pihole).arg("-up").check_run()
}

pub fn run_protonup_update(ctx: &ExecutionContext) -> Result<()> {
let protonup = require("protonup")?;

print_separator("protonup");

ctx.run_type().execute(protonup).check_run()?;
Ok(())
}

pub fn run_config_update(ctx: &ExecutionContext) -> Result<()> {
let sudo = require_option(ctx.sudo().as_ref(), String::from("sudo is not installed"))?;
if ctx.config().yes(Step::ConfigUpdate) {
Expand Down

0 comments on commit 7b52281

Please sign in to comment.