-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.sh
executable file
·67 lines (57 loc) · 1.67 KB
/
setup.sh
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
DOTFILESDIR=$HOME"/.dotfiles"
NOCOLOR=`tput sgr0`
GREEN=`tput setaf 2`
LGREEN=`tput bold; tput setaf 2`
YELLOW=`tput bold; tput setaf 3`
BLUE=`tput bold; tput setaf 4`
MAGENTA=`tput bold; tput setaf 5`
echo "${MAGENTA}homebrew${NOCOLOR}"
echo ""
if [[ ! "$(type -P brew)" ]]; then
echo "- ${GREEN}Installing...${NOCOLOR}"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
echo "- ${BLUE}Already installed!${NOCOLOR}"
fi
echo "${MAGENTA}oh my zsh${NOCOLOR}"
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo "${MAGENTA}lunchy${NOCOLOR}"
gem install lunchy
if [[ "$(type -P brew)" ]]; then
echo ""
echo "- ${GREEN}Updating...${NOCOLOR}"
brew update
echo ""
echo "- ${GREEN}Analyzing...${NOCOLOR}"
brew doctor
echo ""
echo "- ${GREEN}Installing Formulas...${NOCOLOR}"
brew install git nvm
fi
echo ""
echo ""
echo "${GREEN}Hey!${NOCOLOR}"
echo ""
echo "${YELLOW}Selected folder: "
cd ~
pwd
echo "${NOCOLOR}"
echo "${MAGENTA}Downloading dotfiles...${NOCOLOR}"
echo ""
echo "- ${GREEN}Cloning felipemrodrigues/dotfiles.git...${NOCOLOR}"
if [ ! -d "$DOTFILESDIR" ]; then
git clone git@github.com:felipemrodrigues/.dotfiles.git "$DOTFILESDIR"
else
cd "$DOTFILESDIR" && git pull && cd ~
fi
echo "Dotfiles downloaded"
echo ""
echo "- ${GREEN}Making links...${NOCOLOR}"
rm -f ~/.gitconfig ~/.bash_profile ~/.bash_git ~/.bash_prompt
ln -s .dotfiles/.gitconfig ~/.gitconfig
ln -s .dotfiles/.bash_profile ~/.bash_profile
ln -s .dotfiles/.bash_prompt ~/.bash_prompt
ln -s .dotfiles/.bash_git ~/.bash_git
ln -s .dotfiles/.zshrc ~/.zshrc
echo "Links done"
echo ""