-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcore.sh
46 lines (32 loc) · 1.1 KB
/
core.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
46
#!/usr/bin/env bash
echo "Bootstraping your machine"
# Check for Homebrew, install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)")"
fi
# Update homebrew recipes
echo 'Updating Brew'
brew update
echo 'Upgrading brew packages'
brew upgrade
echo 'Installing Rosetta 2'
# Dependacy for Microsoft Teams
sudo softwareupdate --install-rosetta
# Install everything from Brewfile
brew bundle
echo "Cleaning up..."
brew cleanup
echo "Creating folder structure..."
# create development directory
[[ ! -d ~/dev ]] && mkdir ~/dev
echo "Configuring Mac..."
# Close any open System Preferences panes, to prevent them from overriding
# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
# Automatically hide and show the Dock
defaults write com.apple.dock autohide -bool true
# Only Show Open Applications In The Dock
defaults write com.apple.dock static-only -bool true
echo "Mac has been configured."
echo "Bootstrapping complete"