Autoupdate #203
-
Hi there! I'm new to Antidote, understand that there is a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
There are a few different ways to do what you're looking for. If you have a desktop machine that's always on and you want updates in the background, you could add a cron entry to run your updates at a specific time every week. For example, you can run
If you are on a laptop and are okay with updates running once a week when you launch your shell, you could also simply add something like this to your .zshrc: # .zshrc stuff before this...
# Init antidote
source /path/to/antidote
# Look for a file telling us it's been over a week since we last updated.
# If found, delete it so we know to run antidote update.
find $(antidote home) -name '.up2date' -maxdepth 1 -type f -mtime +7 -delete
if [[ ! -r $(antidote home)/.up2date ]]; then
antidote update
touch $(antidote home)/.up2date
fi
# After updating if necessary, load your plugins:
antidote load
# more .zshrc stuff after this... |
Beta Was this translation helpful? Give feedback.
There are a few different ways to do what you're looking for. If you have a desktop machine that's always on and you want updates in the background, you could add a cron entry to run your updates at a specific time every week.
For example, you can run
crontab -e
and add an entry for Monday at noon:If you are on a laptop and are okay with updates running once a week when you launch your shell, you could also simply add something like this to your .zshrc: