-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·35 lines (29 loc) · 1.02 KB
/
setup.sh
File metadata and controls
executable file
·35 lines (29 loc) · 1.02 KB
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
#!/usr/bin/env bash
set -euo pipefail
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=lib/common.sh
source "$REPO_DIR/lib/common.sh"
# shellcheck source=lib/hostname.sh
source "$REPO_DIR/lib/hostname.sh"
# shellcheck source=lib/power.sh
source "$REPO_DIR/lib/power.sh"
# shellcheck source=lib/xcode.sh
source "$REPO_DIR/lib/xcode.sh"
# shellcheck source=lib/homebrew.sh
source "$REPO_DIR/lib/homebrew.sh"
# shellcheck source=lib/tailscale.sh
source "$REPO_DIR/lib/tailscale.sh"
ensure_apple_silicon_macos
ensure_sudo
ensure_hostname
ensure_power_settings
# TS_AUTHKEY is required only if the node isn't already joined to the tailnet,
# so _ensure_tailnet_joined checks for it on demand. tailscaled persists node
# identity in its state file across reboots, so re-runs after first boot
# don't need the auth key.
ensure_xcode_clt
ensure_homebrew
ensure_brew_bundle "$REPO_DIR/Brewfile"
ensure_brew_on_path
ensure_tailscale_up
log "Done. Mac is provisioned. Install the CI agent manually as the next step."