-
-
Notifications
You must be signed in to change notification settings - Fork 607
/
macos_circle_vm_setup.sh
executable file
·40 lines (28 loc) · 1.33 KB
/
macos_circle_vm_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
#!/usr/bin/env bash
set -o errexit
set -x
# Basic tools
brew update >/dev/null 2>/dev/null
# Get docker in first so we can install it and work on other things
brew cask install docker
sudo /Applications/Docker.app/Contents/MacOS/Docker --quit-after-install --unattended
nohup /Applications/Docker.app/Contents/MacOS/Docker --unattended &
brew tap drud/ddev
brew install mysql-client zip nsis jq expect coreutils golang ddev
brew link --force mysql-client
curl -fsSL -o /tmp/gotestsum.tgz https://github.com/gotestyourself/gotestsum/releases/download/v0.3.2/gotestsum_0.3.2_darwin_amd64.tar.gz && tar -C /usr/local/bin -zxf /tmp/gotestsum.tgz gotestsum
# gotestsum
GOTESTSUM_VERSION=0.3.2
curl -fsSL -o /tmp/gotestsum.tgz https://github.com/gotestyourself/gotestsum/releases/download/v${GOTESTSUM_VERSION}/gotestsum_${GOTESTSUM_VERSION}_darwin_amd64.tar.gz && tar -C /usr/local/bin -zxf /tmp/gotestsum.tgz gotestsum
sudo bash -c "cat <<EOF >/etc/exports
/Users -alldirs -mapall=$(id -u):$(id -g) localhost
/private/var -alldirs -mapall=$(id -u):$(id -g) localhost
EOF"
LINE="nfs.server.mount.require_resv_port = 0"
FILE=/etc/nfs.conf
grep -qF -- "$LINE" "$FILE" || ( sudo echo "$LINE" | sudo tee -a $FILE > /dev/null )
sudo nfsd enable && sudo nfsd restart
while ! docker ps 2>/dev/null ; do
sleep 5
echo "Waiting for docker to come up: $(date)"
done