-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathonboard.sh
32 lines (24 loc) · 984 Bytes
/
onboard.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
#!/bin/bash
# Verify the script has been executed.
echo "Running onboarding script..."
# 1 - Install and Verify Build Tools
# Ensure that homebrew is installed.
command -v brew >/dev/null 2>&1 || { echo >&2 "Homebrew is not installed."; exit 1; }
# Ensure that homebrew is installed or install it.
if ! [ -x "$(command -v brew)" ]; then
echo 'Installing homebrew...'
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | bash
fi
# Ensure that mint is installed or install it.
command -v mint >/dev/null 2>&1 || { echo >&2 "Mint is not installed."; exit 1; }
if ! [ -x "$(command -v mint)" ]; then
echo 'Installing mint...'
brew install mint
fi
# 2 - Install Git Hooks
# If there are any scripts in the scripts/git-hooks folder,
# copy them into the .git/hooks folder which is not source controlled.
# This will replace any existing files.
cp -R -a scripts/git-hooks/. .git/hooks
# Verify the script has completed.
echo "Onboarding complete."