-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmacsetup
More file actions
executable file
·31 lines (23 loc) · 849 Bytes
/
macsetup
File metadata and controls
executable file
·31 lines (23 loc) · 849 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
#!/usr/bin/env bash
#
# setup macos stuff.
set -e
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source "$SCRIPT_DIR"/common
if [[ $OSTYPE == "darwin"* ]]; then
info "installing brew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
success "installed brew"
if [[ ! -d "$HOME/.oh-my-zsh" ]]; then
info "installing oh-my-zsh"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
success "installed oh-my-zsh"
run_command "deleting $HOME/.zshrc" \
"rm -f $HOME/.zshrc"
fi
info "installing rosetta"
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
success "installed rosetta"
else
fail "this script can only be run on macos"
fi