-
Notifications
You must be signed in to change notification settings - Fork 63
/
bootstrap.sh
executable file
·36 lines (28 loc) · 1007 Bytes
/
bootstrap.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
#! /usr/bin/env sh
DIR=$(dirname "$0")
cd "$DIR"
. scripts/functions.sh
info "Prompting for sudo password..."
if sudo -v; then
# Keep-alive: update existing `sudo` time stamp until `setup.sh` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
success "Sudo credentials updated."
else
error "Failed to obtain sudo credentials."
fi
info "Installing XCode command line tools..."
if xcode-select --print-path &>/dev/null; then
success "XCode command line tools already installed."
elif xcode-select --install &>/dev/null; then
success "Finished installing XCode command line tools."
else
error "Failed to install XCode command line tools."
fi
info "Installing Rosetta..."
sudo softwareupdate --install-rosetta
# Package control must be executed first in order for the rest to work
./packages/setup.sh
find * -name "setup.sh" -not -wholename "packages*" | while read setup; do
./$setup
done
success "Finished installing Dotfiles"