From b86622e598bbabef38f101e46de6ad395f3f4b0e Mon Sep 17 00:00:00 2001 From: bretello Date: Wed, 16 Feb 2022 10:33:01 +0100 Subject: [PATCH] functions: fix dotfiles_selfupdate() --- check_for_update.zsh | 6 ++++++ functions.zsh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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