mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
no need to look at this cache file any more
Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
parent
fbe7a7d5b1
commit
0b0bd6711d
1 changed files with 6 additions and 10 deletions
|
@ -76,21 +76,17 @@ update_cache() {
|
|||
|
||||
PKG="byobu"
|
||||
|
||||
# The following is somewhat Ubuntu and Debian specific.
|
||||
# The following is somewhat Ubuntu and Debian specific (apt).
|
||||
# I would welcome contributions from other distros to make this
|
||||
# more distro-agnostic.
|
||||
|
||||
cache="/var/lib/update-notifier/updates-available"
|
||||
mycache="/var/run/screen/S-$USER/$PKG.updates-available"
|
||||
|
||||
# If global cache is newer than mycache, overwrite mycache
|
||||
[ $cache -nt $mycache ] && cp -a "$cache" "$mycache"
|
||||
|
||||
# If apt is newer than mycache, background an update now
|
||||
[ "/var/lib/apt" -nt "$mycache" ] && update_cache "$mycache"
|
||||
|
||||
# If mycache is present, use it
|
||||
if [ -r $mycache ]; then
|
||||
if [ "/var/lib/apt" -nt "$mycache" ]; then
|
||||
# If apt is newer than mycache, background an update now
|
||||
update_cache "$mycache"
|
||||
elif [ -r $mycache ]; then
|
||||
# If mycache is present, use it
|
||||
print_updates `grep "^[0-9]" $mycache | sed "s/ .*$//"`
|
||||
else
|
||||
# Otherwise, background an update now
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue