-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
47 lines (35 loc) · 1016 Bytes
/
setup.sh
File metadata and controls
47 lines (35 loc) · 1016 Bytes
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
install_tool() {
if [ $# != 3 ]; then
echo "Incorrect number of arguments"
echo "Usage: install_tool(<tool name> <tool path> <command to install>"
fi
name=$1
tool=$2
install_cmd=$3
if ! [ -x "$(command -v ${tool})" ]; then
echo "Installing ${name}..."
eval ${install_cmd}
else
echo "${name} already installed. skipping..."
fi
echo ""
}
install_app() {
if [ $# != 2 ]; then
echo "Incorrect number of arguments"
echo "Usage: install_app(<app name> <url>"
fi
name=$1
url=$2
if [ -d "/Applications/${name}.app" ]; then
echo "${name} already installed. skipping..."
else
echo "${name} can be found at ${url}."
read -p "Hit [enter] to when you are ready to continue."
fi
echo ""
}
install_tool "homebrew" "brew" '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"'
install_tool "developer tools" "gcc" "xcode-select --install"
install_app "Dash", "https://kapeli.com/dash"
brew install wget