-
Notifications
You must be signed in to change notification settings - Fork 18
/
install.sh
executable file
·46 lines (32 loc) · 1.2 KB
/
install.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
45
46
#!/bin/bash
set -e
[ "$(uname)" == "Linux" ] && sudo apt install make
[ "$(uname)" == "Darwin" ] && xcode-select --install || true
cd ~/dotfiles
make homebrew
[ "$(uname)" == "Linux" ] && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
[ "$(uname)" == "Darwin" ] && eval $(/opt/homebrew/bin/brew shellenv)
# Remove any links from a previous stow operation
[ -L ~/.profile ] && rm ~/.profile
[ -L ~/.bash_profile ] && rm ~/.bash_profile
# Keep pre-existing configuration as environment-specific files
[ -f ~/.profile ] && [ ! -f ~/.env.profile ] && mv ~/.profile ~/.env.profile
[ -f ~/.bash_profile ] && [ ! -f ~/.env.bash_profile ] && mv ~/.bash_profile ~/.env.bash_profile
make tools
[ "$(uname)" == "Linux" ] && make tools.linux
[ "$(uname)" == "Darwin" ] && make tools.macos
make bashrc dotfiles neovim
# Add -B to prevent make from bailing out due to tmux directory name
# https://stackoverflow.com/a/37489147
make -B tmux
if [ "$(uname)" == "Darwin" ]; then
brew install --cask font-hack-mono-nerd-font
fi
echo 'Done! Consider running:'
echo
if [ "$(uname)" == "Darwin" ]; then
echo ' source ~/.bash_profile'
fi
if [ "$(uname)" == "Linux" ]; then
echo ' source ~/.bash_profile; make linux_fonts'
fi