-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall-env
More file actions
executable file
·115 lines (86 loc) · 3.39 KB
/
install-env
File metadata and controls
executable file
·115 lines (86 loc) · 3.39 KB
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
105
106
107
108
109
110
111
112
113
114
#!/bin/bash
function yes_or_no {
while true; do
read -p "$* [y/n]: " yn
case $yn in
[Yy]*) return 0 ;;
[Nn]*) echo "Aborted" ; return 1 ;;
esac
done
}
printf -- 'Installing/updating Homebrew ...\n'
sudo chown -R $(whoami) $(brew --prefix)/*
if [[ $(command -v brew) == "" ]]; then
echo -ne '\n' | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
brew update
fi
printf -- 'Installing Brew Cask ... \n'
brew tap caskroom/cask
printf -- 'Installing git ... \n'
brew install git
## Set git config
echo "We are going to start by setting up your git configuration"
printf -- 'Setting your git config user.name ...\n'
git_user_name=$(git config --get user.name)
while [[ -z $git_user_name ]]; do
read -p "Please enter your git username" -e git_user_name
done
git config --global user.name "$git_user_name"
printf -- 'Setting your git config user.email ...\n'
git_user_email=$(git config --get user.email)
while [[ -z $git_user_email ]]; do
read -p "Please enter your git email" -e git_user_email
done
git config --global user.email "$git_user_email"
printf -- 'Creating a new ssh key using your git email ...\n'
ssh-keygen -t rsa -b 4096 -C "$git_user_email"
## Start the ssh-agent in the background.
eval "$(ssh-agent -s)"
# In Mac-Os Sierra or later you will need to modify your ~/.ssh/config file to automatically
# load keys into the ssh-agent and store passphrases in your keychain
{
echo "Host *"
echo " AddKeysToAgent yes"
echo " UseKeychain yes"
echo " IdentityFile ~/.ssh/id_rsa"
} > ~/.ssh/config
# Add your SSH private key to the ssh-agent and store your passphrase in the keychain.
ssh-add -K ~/.ssh/id_rsa
printf -- 'Installing wget ... \n'
brew install wget
printf -- 'Installing iTerm2 ... \n'
yes_or_no "Do you want to install iTerm2?" && brew cask install iterm2
printf -- 'Installing Google Chrome ... \n'
brew cask install google-chrome
printf -- 'Installing Java 8 ... \n'
brew tap adoptopenjdk/openjdk
brew cask install adoptopenjdk8
printf -- 'Installing Image Magick ... \n'
brew install imagemagick
printf -- 'Installing pidcat ... \n'
brew install pidcat
printf -- 'Installing Source Tree ... \n'
yes_or_no "Do you want to install Source Tree?" && brew cask install sourcetree
printf -- 'Installing Sublime Text ... \n'
yes_or_no "Do you want to install Sublime Text?" && brew cask install sublime-text
printf -- 'Installing Android Studio ... \n'
brew cask install android-studio
printf -- 'Installing Slack ... \n'
yes_or_no "Do you want to install Slack?" && brew cask install slack
printf -- 'Installing Zeplin ... \n'
yes_or_no "Do you want to install Slack?" && brew cask install zeplin
printf -- 'Installing Spotify ... \n'
yes_or_no "Do you want to install Spotify?" && brew cask install spotify
printf -- 'Installing Spectacle ... \n'
yes_or_no "Do you want to install Spectacle?" && brew cask install spectacle
printf -- 'Installing adb-anim ...\n'
brew tap horowitz/adbanim
brew install adb-anim
printf -- 'Installing ktlint ... \n'
curl -sSLO https://github.com/shyiko/ktlint/releases/download/0.24.0/ktlint && \
chmod a+x ktlint && \
sudo mv ktlint /usr/local/bin/
printf -- 'Installing oh-my-zsh \n'
yes_or_no "Do you want to install oh-my-zsh?" && \
brew install zsh; sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"