mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
fix installation script
This commit is contained in:
parent
4fb5bc69ff
commit
b55660dba0
1 changed files with 7 additions and 7 deletions
14
install.zsh
14
install.zsh
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
DOTFILES_PATH="${0:a:h}"
|
||||
|
||||
install_dotfile() {
|
||||
local dest="$1"
|
||||
local contents="$2"
|
||||
|
@ -14,13 +16,11 @@ install_dotfile() {
|
|||
|
||||
# ZSH
|
||||
for zsh_file_name in zshrc; do
|
||||
install_dotfile "$HOME/.$zsh_file_name" '
|
||||
#!/usr/bin/env zsh
|
||||
source "$PWD/zsh/$zsh_file_name"
|
||||
'
|
||||
zsh_file_path="$DOTFILES_PATH/zsh/$zsh_file_name"
|
||||
install_dotfile "$HOME/.$zsh_file_name" "source ${(q)zsh_file_path}"
|
||||
done
|
||||
unset zsh_file_name
|
||||
unset zsh_file_name zsh_file_path
|
||||
|
||||
# Neovim
|
||||
install_dotfile ~/.config/nvim/init.vim 'source $PWD/nvim/init.vim'
|
||||
install_dotfile ~/.config/nvim/ginit.vim 'source $PWD/nvim/ginit.vim'
|
||||
install_dotfile ~/.config/nvim/init.vim "source $DOTFILES_PATH/nvim/init.vim"
|
||||
install_dotfile ~/.config/nvim/ginit.vim "source $DOTFILES_PATH/nvim/ginit.vim"
|
||||
|
|
Loading…
Reference in a new issue