-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmac.sh
executable file
·35 lines (28 loc) · 907 Bytes
/
mac.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
#!/bin/bash
# macos provisioning script
# prerequisites: hostname folder must exist as host-$HOSTNAME
# usage: mac.sh hostname
HOSTNAME=$1
sudo hostname $HOSTNAME
scutil --set HostName $HOSTNAME
cd ~
mkdir git
cd git
#install Xcode CLT
xcode-select --install
# install Homebrew
/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)"
# clone dotfiles
git clone https://github.com/autodidacticon/dotfiles.git
# install 'brew bundle'
brew update
brew tap homebrew/bundle
# install stuff
cd ~/git/dotfiles/host-`hostname`
brew bundle -v
# install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# install dotfiles
rcup -d $HOME/git/dotfiles -B `hostname -s` -x Brewfile