You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

50 lines
1022 B

#!/bin/bash
if [ -f "$HOME/.vimrc" ]; then
# backup old file
mv "$HOME/.vimrc" "$HOME/.vimrc.old"
fi
ln -sf "`pwd`/.vimrc" "$HOME/.vimrc"
if [ -f "$HOME/.ctags" ]; then
mv "$HOME/.ctags" "$HOME/.ctags.old"
fi
ln -sf "`pwd`/.ctags" "$HOME/.ctags"
if [ -f "$HOME/.gitconfig" ]; then
# backup old file
mv "$HOME/.gitconfig" "$HOME/.gitconfig.old"
fi
ln -sf "`pwd`/.gitconfig" "$HOME/.gitconfig"
if [ -f "$HOME/.tmux.conf" ]; then
# backup old file
mv "$HOME/.tmux.conf" "$HOME/.tmux.conf.old"
fi
ln -sf "`pwd`/.tmux.conf" "$HOME/.tmux.conf"
if [ ! -d "$HOME/.ssh" ]; then
mkdir -p "$HOME/.ssh"
fi
if [ -f "$HOME/.ssh/config" ]; then
# backup old file
mv "$HOME/.ssh/config" "$HOME/.ssh/config.old"
fi
cp "`pwd`/.ssh/config" "$HOME/.ssh/config"
if [ ! -d "$HOME/.config" ]; then
mkdir "$HOME/.config"
fi
# install vim and nvim plug
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
## install vim dep
"./vim_dep.sh"