mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 14:03:18 -07:00
add fallback if apt-check is not found
add support for yum (fedora)
This commit is contained in:
parent
89df24392d
commit
ba1461d2fc
2 changed files with 14 additions and 1 deletions
|
@ -1,5 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ ! -x /usr/share/update-notifier/notify-reboot-required ]; then
|
||||||
|
echo "?"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -e /var/run/reboot-required ]; then
|
if [ -e /var/run/reboot-required ]; then
|
||||||
echo "(@)"
|
echo "(@)"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
/usr/lib/update-notifier/apt-check 2>&1 | tail -n 1 | sed "s/;.*$/\!/"
|
if [ -x /usr/lib/update-notifier/apt-check ]; then
|
||||||
|
/usr/lib/update-notifier/apt-check 2>&1 | tail -n 1 | sed "s/;.*$/\!/"
|
||||||
|
elif [ -x /usr/bin/apt-get ]; then
|
||||||
|
/usr/bin/apt-get -s -o Debug::NoLocking=true upgrade | grep ^Inst | wc -l
|
||||||
|
elif [ -x /usr/bin/yum ]; then
|
||||||
|
/usr/bin/yum list updates | grep -c "updates"
|
||||||
|
else
|
||||||
|
echo "?"
|
||||||
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue