1
0
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
prezto/modules/update/init.zsh

25 lines
577 B

#
# Updates Prezto periodically.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
_updater_date_file="$HOME/.zupdate"
if zstyle -t ':prezto:module:update' auto-update; then
zstyle -s ':prezto:module:update' frequency '_updater_check_frequency'
# Initialize the update reminder.
if [[ ! -f "$_updater_date_file" ]]; then
touch "$_updater_date_file"
fi
# Check for update every 7 days.
if [[ "$_updater_date_file"(Nm+$_updater_check_frequency) ]]; then
pupdate && touch "$_updater_date_file"
fi
fi
unset _updater_{date_file,check_frequency}