-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
56 lines (35 loc) · 916 Bytes
/
setup.sh
File metadata and controls
56 lines (35 loc) · 916 Bytes
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
47
48
49
50
51
52
53
54
55
#! /usr/bin/env bash
cd "$(dirname "$0")/.."
set -e
echo ''
info () {
printf "\r [ \033[00;34m..\033[0m ] %s\n" "$1"
}
user () {
printf "\r [ \033[0;33m??\033[0m ] %s\n" "$1"
}
success () {
printf "\r\033[2K [ \033[00;32mOK\033[0m ] %s" "$1"
}
fail () {
printf "\r\033[2K [\033[0;31mFAIL\033[0m] %s\n" "$1"
echo ''
exit
}
info "Installing Homebrew..."
# if brew is not installed
if ! command -v brew &> /dev/null
then
fail "Homebrew could not be found, please install it from https://brew.sh/"
fi
info "Installing stow"
brew install stow
info "Linking dotfiles with stow"
stow -d "$HOME/projects/personal/dotfiles" -t "$HOME" --no-folding --adopt .
info "Installing Brewfile packages..."
sudo brew bundle install --global
info "Syncing iCloud data..."
sh ./sync.sh
info "Changing default shell"
echo "/opt/homebrew/bin/fish" | sudo tee -a /etc/shells
chsh -s "$(which fish)"