mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-24 07:06:19 -07:00
allow for faster startup by skipping apt-check on initial startup
This commit is contained in:
parent
8bf1c83c8e
commit
c18c579c6d
1 changed files with 7 additions and 2 deletions
|
@ -33,12 +33,17 @@ if [ -r $mycache -a -O $mycache ]; then
|
||||||
u=`grep -m 1 "^[0-9]" $mycache | sed "s/\s.*$//"`
|
u=`grep -m 1 "^[0-9]" $mycache | sed "s/\s.*$//"`
|
||||||
print_updates $u
|
print_updates $u
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
# Otherwise, let's quickly clear the cache, and then recreate it with
|
||||||
|
# a really old timestamp (so that it get's updated on next run)
|
||||||
|
rm -f $mycache
|
||||||
|
touch -t 197001010000 $mycache
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If apt-check binary exists, use it
|
# If apt-check binary exists, use it
|
||||||
if [ -x /usr/lib/update-notifier/apt-check ]; then
|
if [ -x /usr/lib/update-notifier/apt-check ]; then
|
||||||
u=`/usr/lib/update-notifier/apt-check 2>&1 | tail -n 1 | sed "s/;.*$//"`
|
u=`/usr/lib/update-notifier/apt-check 2>&1 | tail -n 1 | sed "s/;.*$//" | tee $mycache`
|
||||||
echo "$u" > $mycache
|
|
||||||
print_updates $u
|
print_updates $u
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue