fix installation script

This commit is contained in:
Dmytro Meleshko 2019-05-22 17:11:02 +03:00
parent 4fb5bc69ff
commit b55660dba0

View file

@ -1,5 +1,7 @@
#!/usr/bin/env zsh #!/usr/bin/env zsh
DOTFILES_PATH="${0:a:h}"
install_dotfile() { install_dotfile() {
local dest="$1" local dest="$1"
local contents="$2" local contents="$2"
@ -14,13 +16,11 @@ install_dotfile() {
# ZSH # ZSH
for zsh_file_name in zshrc; do for zsh_file_name in zshrc; do
install_dotfile "$HOME/.$zsh_file_name" ' zsh_file_path="$DOTFILES_PATH/zsh/$zsh_file_name"
#!/usr/bin/env zsh install_dotfile "$HOME/.$zsh_file_name" "source ${(q)zsh_file_path}"
source "$PWD/zsh/$zsh_file_name"
'
done done
unset zsh_file_name unset zsh_file_name zsh_file_path
# Neovim # Neovim
install_dotfile ~/.config/nvim/init.vim 'source $PWD/nvim/init.vim' install_dotfile ~/.config/nvim/init.vim "source $DOTFILES_PATH/nvim/init.vim"
install_dotfile ~/.config/nvim/ginit.vim 'source $PWD/nvim/ginit.vim' install_dotfile ~/.config/nvim/ginit.vim "source $DOTFILES_PATH/nvim/ginit.vim"