mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
This adds the `--force` option to `fwupdmgr refresh` so that this script will not exit, due to `set -e`, when `fwupdmgr refresh` exits non-zero due to the metadata being up-to-date, i.e., ``` Metadata is up to date; use --force to refresh again. ``` Another option would be to use `|| true` but that might hide a legitimate error. This was motivated when I cancelled a run of this script and then later invoked it again, via Update > Firmware, and it would not run `sudo fwupdmgr update` because `fwupdmgr refresh` was exiting non-zero with the above metadata up-to-date "error".
12 lines
170 B
Bash
Executable File
12 lines
170 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
echo -e "\e[32mUpdate Firmware\e[0m"
|
|
|
|
if omarchy-cmd-missing fwupdmgr; then
|
|
omarchy-pkg-add fwupd
|
|
fi
|
|
|
|
fwupdmgr refresh --force
|
|
sudo fwupdmgr update
|