-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfreshen.sh
114 lines (95 loc) · 2.51 KB
/
freshen.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
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
105
106
107
108
109
110
111
112
113
114
#!/bin/bash
#
# FRESHEN
# re-install (or install fresh) all the apps you like
# code & ideas are largely taken from http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac
# Check for Homebrew,
# Install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Update homebrew recipes
brew update
# Install GNU core utilities (those that come with OS X are outdated)
brew install coreutils
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
brew install findutils
# Install Bash 4
brew install bash
# Install more recent versions of some OS X tools
brew tap homebrew/dupes
brew install homebrew/dupes/grep
# install some apps
binaries=(
webkit2png
python
tree
ack
git
wget
ispell
)
echo "installing binaries..."
brew install ${binaries[@]}
brew cleanup
# Brew Cask for OSX apps
brew install caskroom/cask/brew-cask
# to search for more casks, visit http://caskroom.io/
apps=(
emacs
dropbox
google-chrome
appcleaner
firefox
rdio
vagrant
iterm2
flux
slack
)
# Install apps to /Applications
# Default is: /Users/$user/Applications
echo "installing apps..."
brew cask install --appdir="/Applications" ${apps[@]}
# Python Setup
pip install --upgrade pip setuptools
# Mjolnir.app (window manager)
if [[ ! -d /Applications/Mjolnir.app ]]; then
echo "Installing Mjolnir.app (window manager)"
CURRENT_DIR=$PWD
cd /tmp
curl -LOv https://github.com/sdegutis/mjolnir/releases/download/0.4.3/Mjolnir-0.4.3.tgz
tar -zxvf Mjolnir-0.4.3.tgz
sudo mv Mjolnir.app /Applications/
rm Mjolnir*
cd $CURRENT_DIR
fi
echo "Installing Lua -> window manager scripting language"
brew install lua
if [[ ! -s /usr/local/bin/luarocks ]]; then
echo "Installing LuaRocks; deployment tools for Lua modules"
CURRENT_DIR=$PWD
cd /tmp
curl -LOv http://keplerproject.github.io/luarocks/releases/luarocks-2.2.2.tar.gz
tar -zxvf luarocks-2.2.2.tar.gz
cd luarocks-2.2.2
./configure
make
sudo make install
cd ..
rm -rf luarocks*
cd $CURRENT_DIR
fi
if [[ ! -d ~/.luarocks ]]; then
mkdir ~/.luarocks
fi
echo 'rocks_servers = { "http://rocks.moonscript.org" }' > ~/.luarocks/config.lua
echo "Installing Mjolnir extensions"
luarocks install mjolnir.hotkey
luarocks install mjolnir.application
if [[ ! `emacs -version` =~ "24" ]]; then
echo "removing old emacs version"
sudo rm /usr/bin/emacs
sudo rm -rf /usr/share/emacs
fi