-
Notifications
You must be signed in to change notification settings - Fork 2
/
up
executable file
·43 lines (31 loc) · 1.12 KB
/
up
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
#!/bin/bash
# Open terminal with theme so it can be set as default
terminalProfile=$(osascript -e 'tell application "Terminal" to get name of default settings')
test "$terminalProfile" = "Tomorrow Night Bright" || open ./Tomorrow\ Night\ Bright.terminal
# Install Xcode Command-Line Tools
if ! xcode-select -p ; then
xcode-select --install
exit 0
fi
# Install homebrew
which brew || /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew doctor || exit $?
# Install command line tools
brew bundle -v
# Make fish the default shell
if ! grep fish /etc/shells; then
echo '/usr/local/bin/fish' | sudo tee -a /etc/shells
fi
finger $USER | grep fish || chsh -s /usr/local/bin/fish
# Install dotfiles
[ -d ~/.files ] || git clone https://github.com/spinningarrow/.files ~/.files
# Create fish config directories to prevent stow from taking over .config
mkdir -p ~/.config/fish/functions
# For custom scripts to be availabe in $PATH
[ -d ~/bin ] || mkdir ~/bin
# Install dotfiles
pushd ~/.files
ls -d */ | xargs stow
popd
# Install GUI tools and fonts
brew bundle -v --file=Brewfile.casks