-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1-prep-os.sh
executable file
·28 lines (20 loc) · 914 Bytes
/
1-prep-os.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
#!/usr/bin/env
###############################################################################
# Update OS and install Xcode Tools #
###############################################################################
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `1-prep-os.sh` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# Update the OS
echo "------------------------------"
echo "Updating OS. If this requires a restart, run the script again."
# Install all available updates
sudo softwareupdate --install --all --verbose
# Install only recommended available updates
#sudo softwareupdate -ir --verbose
echo "------------------------------"
echo "Installing Xcode Command Line Tools."
# Install Xcode command line tools
xcode-select --install
echo "Done."