mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
automatically get DOTFILES_PATH
This commit is contained in:
parent
a523ed910d
commit
6fcb6b0750
4 changed files with 18 additions and 21 deletions
|
@ -12,7 +12,6 @@ for zsh_file_name in z{shenv,shrc,login}; do
|
|||
cat > "$zsh_file" <<EOF
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
export DOTFILES_PATH="$PWD"
|
||||
source "\$DOTFILES_PATH/$zsh_file_name"
|
||||
source "$PWD/$zsh_file_name"
|
||||
EOF
|
||||
done
|
||||
|
|
6
zlogin
6
zlogin
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
if [[ -n "$DOTFILES_PATH" ]]; then
|
||||
python "$DOTFILES_PATH/welcome/main.py"
|
||||
fi
|
||||
DOTFILES_PATH="${0:h}"
|
||||
|
||||
python "$DOTFILES_PATH/welcome/main.py"
|
||||
|
|
14
zshenv
14
zshenv
|
@ -1,10 +1,8 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
if [[ -n "$DOTFILES_PATH" ]]; then
|
||||
for script in functions path exports; do
|
||||
source "$DOTFILES_PATH/lib/$script.zsh"
|
||||
source_if_exists "$DOTFILES_PATH/custom/$script.zsh"
|
||||
done
|
||||
else
|
||||
echo "please, set DOTFILES_PATH to the path to your dotfiles directory" >&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
|
||||
|
|
16
zshrc
16
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"'
|
||||
|
|
Loading…
Reference in a new issue