-
Notifications
You must be signed in to change notification settings - Fork 0
/
quick-install
52 lines (37 loc) · 1.62 KB
/
quick-install
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
#!/bin/sh
### XCode Command Line Tools
# thx https://github.com/alrra/dotfiles/blob/ff123ca9b9b/os/os_x/installs/install_xcode.sh
if ! xcode-select --print-path &> /dev/null; then
# Prompt user to install the XCode Command Line Tools
xcode-select --install &> /dev/null
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Wait until the XCode Command Line Tools are installed
until xcode-select --print-path &> /dev/null; do
sleep 5
done
echo $? 'Install XCode Command Line Tools'
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Point the `xcode-select` developer directory to
# the appropriate directory from within `Xcode.app`
# https://github.com/alrra/dotfiles/issues/13
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
echo $? 'Make "xcode-select" developer directory point to Xcode'
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Prompt user to agree to the terms of the Xcode license
# https://github.com/alrra/dotfiles/issues/10
sudo xcodebuild -license
echo $? 'Agree with the XCode Command Line Tools licence'
fi
###
##############################################################################################################
if [ ! -d "$HOME/.dotfiles" ]; then
echo "Installing dotfiles for the first time"
git clone --depth=1 https://github.com/srg-kostyrko/dotfiles "$HOME/.dotfiles"
cd "$HOME/.dotfiles"
chmod +x ./run
chmod +x ./scripts/functions
chmod +x ./scripts/update
chmod +x ./bin/*
else
echo "Dotfiles are already installed"
fi