fix update
This commit is contained in:
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Firmware updates often need a reboot, so this only reports what's available.
|
||||
is_installed() {
|
||||
command -v fwupdmgr &>/dev/null
|
||||
}
|
||||
|
||||
run_update() {
|
||||
echo "Checking for firmware updates..."
|
||||
fwupdmgr refresh &>/dev/null
|
||||
# get-updates exits 2 when there is nothing to update
|
||||
if fwupdmgr get-updates --no-unreported-check 2>/dev/null; then
|
||||
echo "Firmware updates are available. Run 'fwupdmgr update' to install them."
|
||||
else
|
||||
echo "No firmware updates available."
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
Reference in New Issue
Block a user