2016-01-24 10:01:44 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-01-28 18:40:42 +00:00
|
|
|
#-------------------------------
|
|
|
|
# Check OS
|
|
|
|
#-------------------------------
|
2016-01-27 15:55:53 +00:00
|
|
|
if [ $(uname -s) != "Darwin" ]; then
|
|
|
|
echo "This should only run on Mac OS X."
|
|
|
|
exit 1
|
|
|
|
fi
|
2016-01-28 18:40:42 +00:00
|
|
|
#-------------------------------
|
2016-01-27 15:55:53 +00:00
|
|
|
|
2016-01-28 18:40:42 +00:00
|
|
|
#-------------------------------
|
|
|
|
# Install Homebrew if missing
|
|
|
|
#-------------------------------
|
2016-01-24 12:42:52 +00:00
|
|
|
if [ ! -x /usr/local/bin/brew ]; then
|
|
|
|
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
|
|
|
fi
|
2016-01-28 18:40:42 +00:00
|
|
|
#-------------------------------
|
2016-01-24 12:42:52 +00:00
|
|
|
|
2016-01-28 18:40:42 +00:00
|
|
|
#-------------------------------
|
|
|
|
# Install the basics
|
|
|
|
#-------------------------------
|
2016-01-24 12:42:52 +00:00
|
|
|
xargs brew install <<EOF
|
|
|
|
git
|
|
|
|
coreutils
|
2016-01-27 15:49:34 +00:00
|
|
|
htop
|
2016-01-24 12:42:52 +00:00
|
|
|
python3
|
|
|
|
vim
|
|
|
|
EOF
|
2016-01-28 18:40:42 +00:00
|
|
|
#-------------------------------
|
2016-01-24 12:42:52 +00:00
|
|
|
|
2016-01-28 18:40:42 +00:00
|
|
|
#-------------------------------
|
|
|
|
# Install Casks
|
|
|
|
#-------------------------------
|
2016-01-24 10:01:44 +00:00
|
|
|
xargs brew cask install <<EOF
|
|
|
|
alfred
|
|
|
|
bbc-iplayer-downloads
|
|
|
|
beardedspice
|
|
|
|
dashlane
|
|
|
|
day-o
|
|
|
|
dropbox
|
|
|
|
cleanmymac
|
|
|
|
firefox
|
|
|
|
flux
|
|
|
|
gitx
|
|
|
|
gpgtools
|
|
|
|
google-chrome
|
|
|
|
google-drive
|
|
|
|
google-hangouts
|
|
|
|
handbrake
|
|
|
|
iterm2
|
|
|
|
sonos
|
|
|
|
textmate
|
|
|
|
vlc
|
|
|
|
vmware-fusion
|
|
|
|
wireshark
|
2016-01-25 10:15:29 +00:00
|
|
|
xquartz
|
2016-01-24 10:07:01 +00:00
|
|
|
yubikey-neo-manager
|
|
|
|
yubikey-personalization-gui
|
2016-01-24 10:01:44 +00:00
|
|
|
EOF
|
2016-01-28 18:40:42 +00:00
|
|
|
#-------------------------------
|
2016-01-28 18:43:32 +00:00
|
|
|
|
|
|
|
#-------------------------------
|
|
|
|
# Some tools require root set-UID
|
|
|
|
#-------------------------------
|
|
|
|
xargs -n1 -I % bash -c 'find $(dirname $(readlink -f $(which %))) -name $(basename $(which %)) -type f ! \( -perm -u+s -a -user root \) ' <<EOF | xargs -n 1 -I % sudo bash -c 'chown root: % && chmod u+s %'
|
|
|
|
htop
|
|
|
|
EOF
|
|
|
|
#-------------------------------
|