Launch fwupdmgr (fix #4)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user