diff --git a/check_for_update.zsh b/check_for_update.zsh index 4f349ff..80ac291 100755 --- a/check_for_update.zsh +++ b/check_for_update.zsh @@ -37,6 +37,12 @@ function update_dotfiles() { } () { + + if [[ -n $DOTFILES_FORCEUPDATE ]]; then + update_dotfiles; + return; + fi + emulate -L zsh local epoch_target mtime option LAST_EPOCH diff --git a/functions.zsh b/functions.zsh index ddad208..2c79dd6 100755 --- a/functions.zsh +++ b/functions.zsh @@ -4,7 +4,7 @@ ## Selfupdate function dotfiles_selfupdate { - (. $DOTFILES/check_for_update.zsh && _upgrade_dotfiles) + (DOTFILES_FORCEUPDATE=1 source $DOTFILES/check_for_update.zsh || echo "[dotfiles_selfupdate] failed") } ## get cheat sheets for commands from cheat.sh. Usage: cheat commandname