forked from gobadiah/workstation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
48 lines (34 loc) · 889 Bytes
/
install.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
#!/bin/bash
# Password-less sudo
echo "%staff ALL = (ALL) NOPASSWD: ALL" > /tmp/passwordless_sudo
sudo chown 0 /tmp/passwordless_sudo
sudo mv /tmp/passwordless_sudo /etc/sudoers.d/
# software updates
sudo softwareupdate -i -a
# Locate database
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
# Homebrew
if ! command -v brew; then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap caskroom/cask
brew untap caskroom/cask
fi
# Chef
brew cask install chefdk
# Workstation
CUR=$PWD
cd /tmp/
rm -rf workstation
git clone https://github.com/gobadiah/workstation
cd workstation
berks install
rm -rf ../cookbooks
berks vendor ../cookbooks
cd ..
if [ -e $CUR/run_list.json ]
then
chef-client -z -l info -j $CUR/run_list.json
else
chef-client -z -l info -o 'recipe[workstation]'
fi
cd $CUR