mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 06:23:19 -07:00
* usr/lib/byobu/updates_available:
- make updates_available aware of homebrew
This commit is contained in:
parent
2ddbdd9967
commit
d7202c86ba
2 changed files with 22 additions and 0 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -11,6 +11,8 @@ byobu (5.34) unreleased; urgency=low
|
||||||
- display logo surrounded by spaces on OSX
|
- display logo surrounded by spaces on OSX
|
||||||
* usr/lib/byobu/time_binary:
|
* usr/lib/byobu/time_binary:
|
||||||
- fix time_binary printing "\n" and killing other output
|
- fix time_binary printing "\n" and killing other output
|
||||||
|
* usr/lib/byobu/updates_available:
|
||||||
|
- make updates_available aware of homebrew
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 08 Feb 2013 14:48:02 -0600
|
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 08 Feb 2013 14:48:02 -0600
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,13 @@ ___update_cache() {
|
||||||
elif $BYOBU_TEST pacman >/dev/null; then
|
elif $BYOBU_TEST pacman >/dev/null; then
|
||||||
# If pacman (Archlinux) exists, use it
|
# If pacman (Archlinux) exists, use it
|
||||||
LC_ALL=C flock -xn "$flock" pacman -Sup | grep -vc "^\(::\| \)" > $mycache &
|
LC_ALL=C flock -xn "$flock" pacman -Sup | grep -vc "^\(::\| \)" > $mycache &
|
||||||
|
elif $BYOBU_TEST brew >/dev/null; then
|
||||||
|
# If homebrew (Mac OSX) exists, use it, also background if flock exists
|
||||||
|
if $BYOBU_TEST flock; then
|
||||||
|
flock -xn "$flock" brew outdated | wc -l > $mycache &
|
||||||
|
else
|
||||||
|
brew outdated | wc -l > $mycache &
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,6 +97,19 @@ ___update_needed() {
|
||||||
[ "$db" -nt "$mycache" ] && return 0
|
[ "$db" -nt "$mycache" ] && return 0
|
||||||
done
|
done
|
||||||
return 1
|
return 1
|
||||||
|
elif $BYOBU_TEST brew >/dev/null; then
|
||||||
|
# Mac OSX
|
||||||
|
# check if any new versions have been installed since
|
||||||
|
# we last cached. this may not recognize formulae
|
||||||
|
# installed with HEAD
|
||||||
|
for f in $(brew --prefix)/Cellar/*; do
|
||||||
|
[ "$f" -nt "$mycache" ] && return 0
|
||||||
|
done
|
||||||
|
|
||||||
|
# nothing new has been installed, so check wether the
|
||||||
|
# formulae database was updated
|
||||||
|
[ "$(brew --prefix)/Library/Formula" -nt "$mycache" ]
|
||||||
|
return $?
|
||||||
fi
|
fi
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue