-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·32 lines (23 loc) · 798 Bytes
/
install.sh
File metadata and controls
executable file
·32 lines (23 loc) · 798 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
#!/bin/bash
echo "==========================================="
echo "=== Setting up Mac ==="
echo "==========================================="
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/$(whoami)/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
brew install ansible
installdir="/tmp/setupmac-$RANDOM"
mkdir $installdir
git clone https://github.com/nico2che/mac-setup.git $installdir
if [ ! -d $installdir ]; then
echo "git cloned failed"
echo "exiting..."
exit 1
else
cd $installdir
ansible-playbook -i ./hosts playbook.yml --verbose
fi
echo "cleaning up..."
rm -Rfv /tmp/$installdir
echo "and we are done! Enjoy!"
exit 0