forked from junegunn-x/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·54 lines (45 loc) · 1.3 KB
/
install
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
#
# Junegunn Choi (junegunn.c@gmail.com)
# 2011/05/25-
# RC files
cd $(dirname $BASH_SOURCE)
BASE=$(pwd)
touch bashrc-extra
for rc in *rc *profile tmux.conf agignore; do
mkdir -pv bak
[ -e ~/.$rc ] && mv -v ~/.$rc bak/.$rc
ln -sfv $BASE/$rc ~/.$rc
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 -p ~/bin
for bin in $BASE/bin/*; do
ln -svf $bin ~/bin
done
# leiningen
mkdir -p ~/.lein
ln -sfv $BASE/profiles.clj ~/.lein/
rm -f ~/.lein/src
ln -sfv $BASE/lein-user ~/.lein/src
if [ $(uname -s) = 'Darwin' ]; then
# Homebrew
[ -z "$(which brew)" ] &&
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "Updating homebrew"
# brew update
brew install \
ag ant cmus coreutils cscope ctags exiftool \
fish git gnuplot graphviz imagemagick leiningen \
maven ranger tmux tree vim wget zsh jq macvim ruby go
gem install coderay
command -v blsd > /dev/null ||
(bash <(curl -fL https://raw.githubusercontent.com/junegunn/blsd/master/install) && mv blsd ~/bin)
fi
git config --global user.email "junegunn.c@gmail.com"
git config --global user.name "Junegunn Choi"
tmux source-file ~/.tmux.conf
./install-vim