-
Notifications
You must be signed in to change notification settings - Fork 0
/
mac-setup.sh
54 lines (41 loc) · 1.48 KB
/
mac-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
##Utility functions
#Custom Utility functions
custom_echo() {
local fmt="$1"; shift
printf "\n$fmt\n" "$@"
}
#Welcome message
custom_echo "Your OS X development machine is just a few steps away"
custom_echo "Author: https://github.com/gokulkrish"
# Setting up git config & .gitignore
custom_echo "==> Setting Git Config <=="
cp gitignore ~/.gitignore_global
git config --global core.excludesfile '~/.gitignore_global'
#Get user's git email id
custom_echo "Enter Your Github Email:"
read emailId
git config --global user.email "$emailId"
#Get user's git username
custom_echo "Enter Your Github Username:"
read userName
git config --global user.name "$userName"
#Install Oh My Zsh
custom_echo "==> Installating Oh My Zsh <== \n"
curl -L http://install.ohmyz.sh | sh
#Copy zshrc config
custom_echo "==> Copying shortcuts <=="
custom_echo "==> Check your .zshrc file for more details <=="
cp zshrc ~/.zshrc
#Install Homebrew
custom_echo "==> Installing Homebrew <== \n"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
#Install node
custom_echo "==> Installing NodeJS <=="
brew install node
#Set up npm for global install without sudo
custom_echo "==> Set up npm for global install without sudo <=="
cp npmrc ~/.npmrc
mkdir "${HOME}/.npm-packages"
#Install commonly used npm and generator-smacss etc.
custom_echo "==> Installing commonly used npm modules & generators <== \n"
npm install -g gulp grunt-cli jshint yo [email protected] generator-smacss