-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·104 lines (90 loc) · 2.78 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
93
94
95
96
97
98
99
100
101
102
103
104
#!/usr/bin/env bash
set -e
red="\033[0;31m"
green="\033[0;32m"
yellow="\033[0;33m"
blue="\033[0;34m"
bold="\033[1m"
reset="\033[0m"
# submodules are used in zsh_custom for plugins/themes
git submodule update --init --recursive
if [ ! -f .gitconfig.inc ]; then
echo -e "${bold}${yellow}Creating .gitconfig.inc from template...${reset}"
cp .gitconfig.inc.template .gitconfig.inc
echo -e "${bold}${red}Edit .gitconfig.inc before continuing.${reset}"
exit 1
fi
if [ ! -d ~/.config ]; then
echo -e "${blue}Creating ~/.config directory...${reset}"
mkdir ~/.config
fi
set -x
# use ~/.vim and ~/.vimrc with neovim
ln -sfh ~/.vim ~/.config/nvim
ln -sf ~/.vim/init.vim ~/.vimrc
ln -sf $PWD/.aprc ~/.aprc
set +x
if [ ! -d ~/.bundle ]; then
echo -e "${blue}Creating ~/.bundle directory...${reset}"
mkdir ~/.bundle
fi
set -x
ln -sf $PWD/bundle_config ~/.bundle/config
ln -sf $PWD/.cobra.yaml ~/.cobra.yaml
ln -sf $PWD/.ctags ~/.ctags
ln -sf $PWD/.eslintrc.js ~/.eslintrc.js
ln -sf $PWD/.gemrc ~/.gemrc
ln -sf $PWD/.gitconfig ~/.gitconfig
ln -sf $PWD/.gitconfig.inc ~/.gitconfig.inc
ln -sf $PWD/.gitignore_global ~/.gitignore_global
ln -sfh $PWD/.git_template ~/.git_template
ln -sf $PWD/.ignore ~/.ignore
ln -sf $PWD/.irbrc ~/.irbrc
ln -sfh $PWD/powerline ~/.config/powerline
ln -sf $PWD/.pryrc ~/.pryrc
ln -sf $PWD/.railsrc ~/.railsrc
ln -sf $PWD/.ssh_config ~/.ssh/config
ln -sf $PWD/.tern-config ~/.tern-config
ln -sf $PWD/.tigrc ~/.tigrc
ln -sf $PWD/.tmux.conf ~/.tmux.conf
ln -sf $PWD/.vimrc ~/.vimrc
ln -sf $PWD/.xvimrc ~/.xvimrc
ln -sf $PWD/.zprofile ~/.zprofile
ln -sf $PWD/.zshenv ~/.zshenv
ln -sf $PWD/.zshrc ~/.zshrc
set +x
if [ ! -d ~/.vim/swapfiles ]; then
echo -e "${blue}Creating ~/.vim/swapfiles directory...${reset}"
mkdir ~/.vim/swapfiles
fi
if [ ! -d ~/bin ]; then
echo -e "${blue}Creating ~/bin directory...${reset}"
mkdir ~/bin
fi
set -x
ln -sf $PWD/bin/imgcat ~/bin/imgcat
ln -sf $PWD/bin/imgls ~/bin/imgls
ln -sf $PWD/bin/delete_branches ~/bin/delete_branches
set +x
if ! command -v rbenv &> /dev/null
then
echo -e "${bold}${yellow}rbenv not installed, skipping default-gems.${reset}"
else
echo -e "Assigning default-gems for rbenv."
set -x
ln -sf $PWD/default-gems "$HOME/.rbenv/default-gems"
set +x
fi
# Xcode custom editor theme
xcode_theme_path=~/Library/Developer/Xcode/UserData/FontAndColorThemes/
if [ -d $xcode_theme_path ]; then
echo -e "${blue}Installing custom Xcode theme...${reset}"
set -x
cp Solarized-Dark-Hacked.xccolortheme $xcode_theme_path
set +x
else
echo -e "${bold}${yellow}Xcode not installed, skipping theme.${reset}"
fi
echo -e "${green}Done! Next steps:${reset}"
echo -e "- Install a nerd font and configure terminal to use it, see ${red}install-fonts${reset}."
echo -e "- Add a .gitconfig in ~/work to override email and signing key (optional)."