diff options
Diffstat (limited to 'install.sh')
| -rw-r--r-- | install.sh | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -21,10 +21,11 @@ mode="copy" # copy,slink # Auto config # =========== +# Append ~ later (bash only does 1 substitution of variables) if [[ $platform = "linux" ]]; then - VIMFILES="~/.vim" + VIMFILES=".vim" elif [[ $platform = "windows" ]]; then - VIMFILES="~/vimfiles" + VIMFILES="vimfiles" fi [[ $mode = "copy" ]] && cp_or_ln="cp" @@ -46,10 +47,11 @@ eval $cp_or_ln " ${PWD}/inputrc ~/.inputrc" # ~/.vimrc takes priority over ~/.vim/vimrc, so remove the former first -mkdir -p $VIMFILES/{undo,swap,backup,pack} +[ -d ~/.vim/ ] || mkdir -p ~/$VIMFILES/{undo,swap,backup,plugins} +chmod 0700 ~/.vim/swap # swap files should only be readable by owner -eval $cp_or_ln " ${PWD}/vim/vimrc $VIMFILES/vimrc" -eval $cp_or_ln " ${PWD}/vim/fun.vim $VIMFILES/fun.vim" +eval $cp_or_ln " ${PWD}/vim/vimrc ~/$VIMFILES/vimrc" +eval $cp_or_ln " ${PWD}/vim/fun.vim ~/$VIMFILES/fun.vim" # done |
