aboutsummaryrefslogtreecommitdiffstats
path: root/os-x_move_in.sh
blob: 464ed0c08f89aaf35a86ffb50eec3f5eeb14f69a (plain) (blame)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#!/bin/bash

defaults write com.apple.finder AppleShowAllFiles YES
defaults write -g ApplePressAndHoldEnabled -bool false

# Support external bluetooth adapters
sudo nvram bluetoothHostControllerSwitchBehavior=always

sudo defaults write /System/Library/LaunchAgents/com.apple.gamed disabled -bool true

if ! [ -e /usr/local/bin/brew ]; then
    # Install Homebrew
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    brew doctor
fi

if ! [ -e /usr/local/bin/brew-cask ]; then
    # Install Homebrew Cask
    brew tap caskroom/cask
    brew install caskroom/cask/brew-cask
fi

if [ -d "/Applications/Little\ Snitch\ Configuration.app" ]; then

    brew cask install little-snitch
    echo "Reboot, or run this script again"

else

    brew cask install \
        alfred \
        caffeine \
        dash \
        displaylink \
        evernote \
        gfxcardstatus \
        google-chrome \
        iterm2 \
        itsycal \
        lastpass \
        nicecast \
        mou \
        musicbrainz-picard \
        rescuetime \
        spamsieve \
        steam \
        switchresx \
        the-unarchiver \
        transmission \
        transmit \
        vagrant \
        vagrant-manager \
        vlc \
        vmware-fusion

    brew install \
         git \
	 git-extras \
         mercurial \
	 pt \
	 the_silver_searcher \
	 ack \
	 procmail \
	 fetchmail \
	 msmtp \
	 editorconfig \
	 direnv \
	 w3m \
	 tmux \
	 nmap \
	 gnutls \
	 hunspell

    brew install --HEAD mobile-shell

#        slack \

fi

if ! [ -d '/Applications/LastPass.app' ]; then

    brew cask install lastpass
    open '/opt/homebrew-cask/Caskroom/lastpass/latest/LastPass Installer.app'
    read -p "Press [Enter] key to continue..."
fi

cd $HOME

if ! [ -d "$HOME/dotfiles" ]; then
    git clone git@beehive.io:jason/dotfiles.git
    cd dotfiles
else
    cd dotfiles
    git pull
fi

./common_move_in.sh

open "/opt/homebrew-cask/Caskroom/little-snitch/3.5.1/Little Snitch Installer.app"

cd /System/Library/LaunchAgents
launchctl unload -w com.apple.photolibraryd.plist
launchctl unload -w com.apple.screensharing.MessagesAgent.plist
launchctl unload -w com.apple.screensharing.agent.plist