mirror of
https://github.com/zuno/slackpkgplus
synced 2024-12-27 09:58:34 +01:00
slackpkgplus: do not show the notices that the pkglist is older than 24h and that remember to run slackpkg update when called update or check-updates commands
This commit is contained in:
parent
0376c59e9d
commit
530c8fb5c3
1 changed files with 16 additions and 10 deletions
|
@ -1242,18 +1242,22 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
|||
fi
|
||||
done
|
||||
|
||||
if [ $[$(date +%s)-$(date -d "$(ls -l --full-time $WORKDIR/pkglist 2>/dev/null|awk '{print $6,$7,$8}')" +%s)] -gt 86400 -a "$CMD" != "update" ];then
|
||||
if [ "$CMD" != "update" -a "$CMD" != "check-updates" ];then
|
||||
if [ $[$(date +%s)-$(date -d "$(ls -l --full-time $WORKDIR/pkglist 2>/dev/null|awk '{print $6,$7,$8}')" +%s)] -gt 86400 ];then
|
||||
echo
|
||||
echo "NOTICE: pkglist is older than 24h; you are encouraged to re-run 'slackpkg update'"
|
||||
echo
|
||||
sleep 1
|
||||
fi
|
||||
if [ $CONF/slackpkgplus.conf -nt $WORKDIR/pkglist -a "$CMD" != "update" ];then
|
||||
fi
|
||||
if [ "$CMD" != "update" -a "$CMD" != "check-updates" ];then
|
||||
if [ $CONF/slackpkgplus.conf -nt $WORKDIR/pkglist ];then
|
||||
echo
|
||||
echo "NOTICE: remember to re-run 'slackpkg update' after modifying slackpkgplus.conf"
|
||||
echo
|
||||
sleep 5
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# -- merge priorities from PKGS_PRIORITY with PRIORITY, as needed ...
|
||||
|
@ -1630,6 +1634,8 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
|||
cat ${TMPDIR}/updated-repos.txt > ~/.slackpkg/updated-repos.txt
|
||||
else
|
||||
echo "No news is good news"
|
||||
# Suppress the "pkglist is older than 24h" notice
|
||||
touch $WORKDIR/pkglist
|
||||
fi
|
||||
|
||||
cleanup
|
||||
|
|
Loading…
Reference in a new issue