-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.sh
executable file
·44 lines (36 loc) · 1.03 KB
/
init.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
#!/usr/bin/env bash
set -e
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ ! -d "$HOME/dotfiles" ]; then
echo 'cloning dotfiles repo ...'
git clone [email protected]:rkoval/dotfiles.git "$HOME/dotfiles"
fi
cd "$HOME/dotfiles"
source ./export_homebrew_home.sh
echo 'setting up xcode ...'
( set -x ; sudo xcodebuild -license accept )
( set -x ; sudo chown -R $USER /usr/local )
if [ -e $HOMEBREW_HOME/bin/brew ]; then
eval "$($HOMEBREW_HOME/bin/brew shellenv)"
fi
if ! command -v brew > /dev/null; then
echo 'installing homebrew...'
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# arm only, must do after also
if ! command -v brew > /dev/null ; then
eval "$($HOMEBREW_HOME/bin/brew shellenv)"
fi
# intel only
if [ -e /usr/local/Cellar ]; then
sudo chown -R "$(whoami)" /usr/local/Cellar || return $?
fi
fi
./init/submodules.sh
./init/jamf.sh
./init/recipes.sh
./init/casks.sh
./init/alfred.sh
./link.sh
./init/shell.sh
./init/macos.sh
./init/settings.sh