diff --git a/README.md b/README.md index 89fc8b89..ecde4d18 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ Just invoke `topgrade`. It will invoke the following steps: * *Arch*: Invoke [yay](https://github.com/Jguer/yay) or fall back to pacman * *Redhat based*: Invoke `yum upgrade` * *Debian based*: Invoke `apt update && apt dist-upgrade` +* *Linux*: Invoke [fwupdmgr](https://github.com/hughsie/fwupd) to show firmware upgrade. (View only. No upgrades will actually be performed) * *Linux*: Run [needrestart](https://github.com/liske/needrestart) * *macOS*: Upgrade [Homebrew](https://brew.sh/) packages * *macOS*: Upgrade App Store applications diff --git a/src/main.rs b/src/main.rs index 79ed88ab..1217d54b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -193,6 +193,15 @@ fn run() -> Result<()> { _ => (), } + if let Ok(fwupdmgr) = which("fwupdmgr") { + terminal.print_separator("Firmware upgrades"); + Command::new(&fwupdmgr) + .arg("refresh") + .spawn()? + .wait()? + .and_then(|| Command::new(&fwupdmgr).arg("get-updates").spawn()?.wait())?; + } + if let Ok(sudo) = &sudo { if let Ok(needrestart) = which("needrestart") { terminal.print_separator("Check for needed restarts");