forked from holman/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 3
/
install.sh
executable file
·45 lines (33 loc) · 910 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
38
39
40
41
42
43
44
45
#!/bin/sh
export ZSH=$HOME/.dotfiles
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until finished
while true; do
sudo -n true
sleep 60
kill -0 "$$" || exit
done 2>/dev/null &
# Source utils
source "${ZSH}/util/interactive"
# Set up for failure
set -e
# Install symlinks
install_dotfiles() {
local overwrite_all=false backup_all=false skip_all=false
for src in $(find -H "${ZSH}" -maxdepth 2 -name '*.symlink'); do
dst="$HOME/.$(basename "${src%.*}")"
link_file "$src" "$dst"
done
}
info "installing dotfile symlinks"
install_dotfiles
# Install ZSH
${ZSH}/zsh/install.sh
# Install Homebrew
${ZSH}/homebrew/install.sh
# Find the other installers and run them
find ${ZSH} -name "install.sh" -not \( -path "**/homebrew/*" -o -path "**/zsh/*" \) | while read installer; do
sh -c "${installer}"
done
success "done installing!"