forked from danielsaidi/osx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·85 lines (77 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/bash
# DESCRIPTION
# Executes the command line interface.
# USAGE
# ./setup.sh [OPTION]
# OPTIONS
process_option() {
case $1 in
'all')
source scripts/config.sh
source scripts/system.sh
brew bundle
bundle install
source scripts/dev.sh
source scripts/git.sh
source scripts/npm.sh
source scripts/ssh.sh
break;;
'brew')
brew bundle
break;;
'config')
source scripts/config.sh
break;;
'dev')
source scripts/dev.sh
break;;
'gem')
bundle install
break;;
'git')
source scripts/git.sh
break;;
'npm')
source scripts/npm.sh
break;;
'ssh')
source scripts/ssh.sh
break;;
'system')
source scripts/system.sh
break;;
'q')
break;;
*)
break;;
esac
}
# MENU
while true; do
if [[ $# == 0 ]]; then
echo ""
echo "******************"
echo " Setup OS X "
echo "******************"
echo ""
echo "Available commands:"
echo ""
echo " all: Install everything"
echo " brew: Install packages & applications from Brewfile"
echo " config: Configure macOS"
echo " dev: Configure development environment"
echo " gem: Install packages from Gemfile"
echo " git: Display .gitconfig aliases"
echo " npm: Install npm packages from scripts/npm.sh"
echo " ssh: Create & copy SSH key"
echo " system: Install system software"
echo ""
echo " q: Quit/Exit."
echo ""
read -p "Enter option: " response
echo ""
process_option $response
else
process_option $1
fi
done