-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·140 lines (111 loc) · 3.15 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
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#!/bin/bash
source _utils.sh
# Ask for the administrator password upfront.
sudo -v
# Keep-alive: update existing `sudo` time stamp until the script has finished.
while true; do
sudo -n true
sleep 60
kill -0 "$$" || exit
done 2>/dev/null &
# install homebrew https://brew.sh/
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew tap homebrew/cask
# node is a prerequisite for many tools
brew uninstall node
brew prune
#gatsby requires node 14.x
brew install node@14
brew doctor
brew Update
brew cleanup
which node
# Setup Mac
source osx.sh
# Visula studio code is mandatory
source vscode.sh
read -p "Do you wish to install Web Development Tools (Please answer y/n)? " yn
case $yn in
[Yy]*) source webdev.sh ;;
*) echo "Please answer yes or no." ;;
esac
read -p "Do you wish to install Tools (Please answer y/n)? " yn
case $yn in
[Yy]*) source tools.sh ;;
*) echo "Please answer yes or no." ;;
esac
read -p "Do you wish to install AWS Tools (Please answer y/n)? " yn
case $yn in
[Yy]*) source aws.sh ;;
*) echo "Please answer yes or no." ;;
esac
read -p "Do you wish to install Kubernetes CLI (Please answer y/n)? " yn
case $yn in
[Yy]*) source kubernetes.sh ;;
*) echo "Please answer yes or no." ;;
esac
read -p "Do you wish to install Terraform Automation (Please answer y/n)? " yn
case $yn in
[Yy]*) source terraform.sh ;;
*) echo "Please answer yes or no." ;;
esac
read -p "Do you wish to install Slack (Please answer y/n)? " yn
case $yn in
[Yy]*) brew install -g -f slack;;
*) echo "Please answer yes or no." ;;
esac
read -p "Do you wish to install AndroidStudio (Please answer y/n)? " yn
case $yn in
[Yy]*) source android.sh ;;
*) echo "Please answer yes or no." ;;
esac
read -p "Do you wish to change GO language (Please answer y/n)? " yn
case $yn in
[Yy]*) source go.sh ;;
*) echo "Please answer yes or no." ;;
esac
read -p "Do you wish to change OSX Preferences (Please answer y/n)? " yn
case $yn in
[Yy]*) source osx-prefs.sh ;;
*) echo "Please answer yes or no." ;;
esac
ln -s .profile .zprofile
# ------------------------------------------------------------------------------
e_pending "Creating summary"
# ------------------------------------------------------------------------------
echo "\r"
e_success "Default commands"
if has_path "Projects"; then
e_success "~/Projects"
else
e_failure "~/Projects"
fi
test_command "xcode-select"
test_command "brew"
test_command "watchman"
test_command "trash"
test_command "git"
test_command "git-flow"
test_command "zsh"
test_command "node"
test_command "n"
test_command "yarn"
test_command "npm"
test_app "Sketch"
test_app "Slack"
test_app "Sourcetree"
test_app "Visual Studio Code"
e_success "Optimization commands"
echo "\r"
# ------------------------------------------------------------------------------
e_pending "Running optimizations"
# ------------------------------------------------------------------------------
e_pending "Optimizing Homebrew"
brew doctor
brew cleanup
defaults write com.apple.dock ResetLaunchPad -boolean true
killall Dock
e_settled "Installation complete!"
# Make the Homebrew copy of zsh your default shell
#chsh -s /usr/local/bin/zsh
#fi