-
Notifications
You must be signed in to change notification settings - Fork 1
/
install
executable file
·92 lines (70 loc) · 2.67 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
function relink() {
if [[ -h "$1" ]]; then
echo "Relinking $1"
# Symbolic link? Then recreate.
rm "$1"
ln -sn "$2" "$1"
elif [[ ! -e "$1" ]]; then
echo "Linking $1"
ln -sn "$2" "$1"
else
echo "$1 exists as a real file, skipping."
fi
}
echo "--- Linking files ---"
cd ~
relink .gitconfig ~/.dotfiles/git-config
relink .gitignore ~/.dotfiles/git-ignore-global
relink .hgrc ~/.dotfiles/hgrc
relink bin ~/.dotfiles/bin
relink .vimrc ~/.dotfiles/vimrc
relink .npmrc ~/.dotfiles/npmrc
# ---- Homebrew ----
echo "Installing Homebrew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv)"
chmod -R go-w "$(brew --prefix)/share"
echo "installing brew apps"
brew install git vim lynx wget ack hub tree highlight zsh-autosuggestions zsh-syntax-highlighting
# Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
relink .bash_profile ~/.dotfiles/bash_profile
relink .bashrc ~/.dotfiles/bashrc
relink .zshrc ~/.dotfiles/zshrc
source ~/.zshrc
# powerlevel theme
# install font: https://github.com/romkatv/powerlevel10k#get-started
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
echo "restart terminal to configure p10k"
# ---- GPG ----
echo "Remember to generate your gpg key:
# https://gist.github.com/leobalter/649a1289deb57a8a7a8e0fbcefc55128
# 1. Visit https://help.github.com/articles/generating-a-new-gpg-key/
# 2. git config --global user.signingkey YOUR-SIGNING-KEY-PUB-ID"
mkdir -p ~/.gnupg
cd ~/.gnupg
relink gpg.conf ~/.dotfiles/gpgconf
relink gpg-agent.conf ~/.dotfiles/gpgagentconf
# ---- Volta ----
curl https://get.volta.sh | bash
volta install node
# ---- VIM ----
echo "--- Setting vim plugins ---"
# installs pathogen
mkdir -p ~/.vim ~/.vim/autoload ~/.vim/bundle ~/.vim/colors && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
# installs pathogen vim bundles
cd ~/.vim/bundle
# Refs: http://vimawesome.com
git clone https://github.com/pangloss/vim-javascript.git
git clone git://github.com/airblade/vim-gitgutter.git
git clone https://github.com/scrooloose/nerdtree.git
git clone git://github.com/ntpeters/vim-better-whitespace.git
git clone https://github.com/bling/vim-airline ~/.vim/bundle/vim-airline
git clone https://github.com/editorconfig/editorconfig-vim
mkdir $HOME/.vim/colors/
curl -LSso $HOME/.vim/colors/lucario.vim https://raw.githubusercontent.com/raphamorim/lucario/master/colors/lucario.vim
relink $HOME/.vim/colors/monokai.vim $HOME/.dotfiles/vim-colors/monokai.vim
echo "--- Done! ---"
cd $HOME