diff --git a/install.sh b/install.sh index 9535d1b..97c1a9e 100755 --- a/install.sh +++ b/install.sh @@ -12,7 +12,6 @@ for zsh_file_name in z{shenv,shrc,login}; do cat > "$zsh_file" <&2 -fi +DOTFILES_PATH="${0:h}" + +for script in functions path exports; do + source "$DOTFILES_PATH/lib/$script.zsh" + source_if_exists "$DOTFILES_PATH/custom/$script.zsh" +done diff --git a/zshrc b/zshrc index 4ee333a..745964a 100755 --- a/zshrc +++ b/zshrc @@ -1,11 +1,11 @@ #!/usr/bin/env zsh -if [[ -n "$DOTFILES_PATH" ]]; then - for script in oh-my-zsh aliases widgets theme; do - source "$DOTFILES_PATH/lib/$script.zsh" - source_if_exists "$DOTFILES_PATH/custom/$script.zsh" - done +DOTFILES_PATH="${0:h}" - run_before rbenv 'eval "$(rbenv init -)"' - run_before sdk 'source_if_exists "$SDKMAN_DIR/bin/sdkman-init.sh"' -fi +for script in oh-my-zsh aliases widgets theme; do + source "$DOTFILES_PATH/lib/$script.zsh" + source_if_exists "$DOTFILES_PATH/custom/$script.zsh" +done + +run_before rbenv 'eval "$(rbenv init -)"' +run_before sdk 'source_if_exists "$SDKMAN_DIR/bin/sdkman-init.sh"'