-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·62 lines (54 loc) · 1.62 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
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 ""
echo "${GREEN}Welcome to the installation process :)${NOCOLOR}"
echo ""
echo "${YELLOW}The installer will use this dir: "
cd ~
pwd
echo "${NOCOLOR}"
echo "${MAGENTA}Homebrew${NOCOLOR}"
echo ""
if [[ ! "$(type -P brew)" ]]; then
echo "- ${GREEN}Installing...${NOCOLOR}"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
else
echo "- ${BLUE}Already installed!${NOCOLOR}"
fi
if [[ "$(type -P brew)" ]]; then
echo ""
echo "- ${GREEN}Updating...${NOCOLOR}"
brew update
echo ""
echo "- ${GREEN}Analyzing...${NOCOLOR}"
brew doctor
echo ""
echo "- ${GREEN}Adding repos (tap)...${NOCOLOR}"
brew tap homebrew/cask-fonts
echo ""
echo "- ${GREEN}Installing Formulas...${NOCOLOR}"
brew install zsh git nvm
brew install --cask font-victor-mono iterm2 postman google-chrome
fi
echo ""
echo "${MAGENTA}Dotfiles${NOCOLOR}"
echo ""
echo "- ${GREEN}Cloning pedroputz/osx-setup-dotfiles.git...${NOCOLOR}"
if [ ! -d "$DOTFILESDIR" ]; then
git clone [email protected]:pedroputz/osx-setup-dotfiles.git "$DOTFILESDIR"
else
cd "$DOTFILESDIR" && git pull && cd ~
fi
echo "${MAGENTA}Oh My ZSH${NOCOLOR}"
echo ""
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
echo ""
echo "- ${GREEN}Making links${NOCOLOR}"
rm -f ~/.gitconfig ~/.zshrc
ln -s .dotfiles/.gitconfig ~/.gitconfig
ln -s .dotfiles/.zshrc ~/.zshrc