mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 14:03:18 -07:00
* usr/lib/byobu/updates_available:
- Add support for opkg (OpenWrt)
This commit is contained in:
parent
0875bfed2d
commit
6e62ff2ffc
2 changed files with 22 additions and 1 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -38,6 +38,8 @@ byobu (5.128) unreleased; urgency=medium
|
|||
- Fix typo
|
||||
* usr/lib/byobu/services:
|
||||
- Fix reading services from $BYOBU_CONFIG_DIR/statusrc
|
||||
* usr/lib/byobu/updates_available:
|
||||
- Add support for opkg (OpenWrt)
|
||||
* usr/share/byobu/keybindings/f-keys.tmux:
|
||||
- Remove -k for new-window. In older versions of tmux, -k without
|
||||
-t <target-window> had no effect. In tmux 2.8, -k without -t will
|
||||
|
|
|
@ -67,9 +67,16 @@ ___update_cache() {
|
|||
elif eval $BYOBU_TEST pacman >/dev/null; then
|
||||
# If pacman (Archlinux) exists, use it
|
||||
LC_ALL=C flock -xn "$flock" pacman -Sup | grep -vc "^\(::\| \)" >$mycache 2>/dev/null &
|
||||
elif eval $BYOBU_TEST opkg >/dev/null; then
|
||||
# If opkg (OpenWrt) exists, use it, also background if flock exists
|
||||
if eval $BYOBU_TEST flock >/dev/null; then
|
||||
flock -xn "$flock" opkg list-upgradable | wc -l >$mycache 2>/dev/null &
|
||||
else
|
||||
opkg list-upgradable | wc -l >$mycache &
|
||||
fi
|
||||
elif eval $BYOBU_TEST brew >/dev/null; then
|
||||
# If homebrew (Mac OSX) exists, use it, also background if flock exists
|
||||
if eval $BYOBU_TEST flock; then
|
||||
if eval $BYOBU_TEST flock >/dev/null; then
|
||||
flock -xn "$flock" brew outdated | wc -l >$mycache 2>/dev/null &
|
||||
else
|
||||
brew outdated | wc -l >$mycache &
|
||||
|
@ -106,6 +113,18 @@ ___update_needed() {
|
|||
[ "$db" -nt "$mycache" ] && return 0
|
||||
done
|
||||
return 1
|
||||
elif eval $BYOBU_TEST opkg >/dev/null; then
|
||||
# OpenWrt
|
||||
[ ! -e /var/lock/opkg.lock ] || return 1
|
||||
if [ -d /var/opkg-lists ]; then
|
||||
[ /var/opkg-lists -nt "$mycache" ]
|
||||
return $?
|
||||
else
|
||||
local u s
|
||||
read u s < "$mycache"
|
||||
[ "$u" -gt 0 ]
|
||||
return $?
|
||||
fi
|
||||
elif eval $BYOBU_TEST brew >/dev/null; then
|
||||
# Mac OSX
|
||||
# check if any new versions have been installed since
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue