Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for updates weekly #567

Open
MicahElliott opened this issue Mar 26, 2021 · 1 comment
Open

Check for updates weekly #567

MicahElliott opened this issue Mar 26, 2021 · 1 comment

Comments

@MicahElliott
Copy link

Presently, the README instructs to do something like this at the end of setup:

zplug check || zplug install
zplug load

But this only checks for new additions (because it's cheap and fast) and ignores any packages that may have been updated. A similar check to the above for updates could be:

zplug check || zplug install

### NEW WEEKLY REMINDER
if [[ ! -f $TMPDIR/zplugstamp ]]; then
    print "Creating new zplug timestamp update tracking file."
    touch $TMPDIR/zplugstamp
fi
if (( ( $(date  %s) - $(date  %s -r $TMPDIR/zplugstamp) ) / 86400 > 7 )); then
    print "Detected that it's been over a week since updating your zsh plugins."
    print "Run this now to update:\nzplug update; touch $TMPDIR/zplugstamp"
fi

zplug load #--verbose

This uses a timestamped temp file to remind you ~weekly that you haven't updated in a while.

It'd be nice if zplug had a built-in way to do this for users.

@MicahElliott
Copy link
Author

I'm not certain this is a great idea -- building it into zplug -- but I wanted to hear feedback. An alternative is to make users have a calendar reminder to check for editor plugin, OS, Zsh, etc updates. I naturally update my OSs and Emacs packages weekly but don't think to update my Zshs regularly, and I should.

Could also do this as a cron job that emails weekly if there are updates (as I've relied on from Yum in the past)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant