blob: e4ed2e34b6148ac12f41ab21e528e3d7a07c9f62 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/bash
# run this script as ./install as we set its working dir from $BASH_SOURCE
cd $(dirname $BASH_SOURCE)
# the path of the working dir
BASE=$(pwd)
# dotfiles to install
for dotfile in bashrc vimrc; do
mkdir -pv bak
[ -e ~/.$dotfile ] && mv -v ~/.$dotfile bak/.$dotfile
ln -sfv $BASE/$dotfile ~/.$dotfile
done
# git-prompt
if [ ! -e ~/.git-prompt.sh ]; then
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh
fi
# scripts
mkdir -pv ~/bin
for bin in $BASE/bin/*; do
ln -svf $bin ~/bin
done
# install vim-plug
if [ ! -e ~/.vim/autoload/plug.vim ]; then
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
fi
|