diff --git a/brethil_dotfile.sh b/brethil_dotfile.sh index a7b1c98..cae0e0e 100755 --- a/brethil_dotfile.sh +++ b/brethil_dotfile.sh @@ -1,5 +1,5 @@ # Check for update, set DISABLE_UPDATE_PROMPT=yes to disable the prompt and automatically update -env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT zsh -f $DOTFILES/check_for_update.sh +env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT DOTFILES=$DOTFILES zsh -f $DOTFILES/check_for_update.sh # oh-my-zsh plugins (some of these have to be installed by running install.sh or install_zsh_plugins, found in install.sh) shared_plugins=(git alias-tips sudo common-aliases fast-syntax-highlighting zsh-autosuggestions colored-man-pages zsh-navigation-tools zsh_reload ) diff --git a/check_for_update.sh b/check_for_update.sh index 3894c23..c5808ea 100755 --- a/check_for_update.sh +++ b/check_for_update.sh @@ -26,13 +26,13 @@ if [[ -z "$epoch_target" ]]; then fi # Cancel upgrade if the current user doesn't have write permissions for the -# oh-my-zsh directory. -[[ -w "$ZSH" ]] || return 0 +# dotfiles directory. +[[ -w "$DOTFILES" ]] || return 0 # Cancel upgrade if git is unavailable on the system whence git >/dev/null || return 0 -if mkdir "$DOTFILES/log/update.lock" 2>/dev/null; then +if mkdir "$DOTFILES/update.lock" 2>/dev/null; then if [ -f ~/.dotfiles-update ]; then . ~/.dotfiles-update @@ -59,5 +59,5 @@ if mkdir "$DOTFILES/log/update.lock" 2>/dev/null; then _update_dotfiles_update fi - rmdir $DOTFILES/log/update.lock + rmdir $DOTFILES/update.lock fi