-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpreinstall.sh
More file actions
executable file
·115 lines (100 loc) · 2.02 KB
/
preinstall.sh
File metadata and controls
executable file
·115 lines (100 loc) · 2.02 KB
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
115
#!/bin/bash
fancy_echo() {
local fmt="$1"; shift
# shellcheck disable=SC2059
printf "\n$fmt\n" "$@"
}
# 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
formulas=(
reattach-to-user-namespace
bash
vim --override-system-vi
)
brew install ${formulas[@]}
brew bundle --file=- <<EOF
tap "homebrew/services"
tap "universal-ctags/universal-ctags"
tap "caskroom/cask"
tap "caskroom/versions"
# Unix
brew "universal-ctags", args: ["HEAD"]
brew "the_silver_search"
brew "fzf"
brew "ripgrep"
brew "git"
brew "bash-completion@2"
brew "nodejs"
brew "wget"
brew "ipv6toolkit"
brew "the_silver_searcher"
brew "wifi-password"
brew "tmux"
brew "cmake"
brew "emacs"
brew "reattach-to-user-namespace"
brew "git-extras"
brew "youtube-dl"
EOF
brew install wireshark --with-qt
casks=(
unicodechecker
dropbox
1password
google-chrome
google-chrome-canary
google-cloud-sdk
go2shell
visual-studio-code
rectangle
alfred
flux
)
brew cask install --appdir="/Applications" ${casks[@]}
update_shell() {
local shell_path;
shell_path="$(which bash)"
fancy_echo "Changing your shell to bash ..."
if ! grep "$shell_path" /etc/shells > /dev/null 2>&1 ; then
fancy_echo "Adding '$shell_path' to /etc/shells"
sudo sh -c "echo $shell_path >> /etc/shells"
fi
sudo chsh -s "$shell_path" "$USER"
}
case "$SHELL" in
*/bash)
if [ "$(which bash)" != '/usr/local/bin/bash' ] ; then
update_shell
fi
;;
*)
update_shell
;;
esac
brew cleanup
brew cask cleanup
npmglobals=(
http-server
json
rimraf
trash-cli
mkdirp
alfred-npms
uglify-js
serve
standard
node-gyp
nave
git-open
)
npm install -g ${npmglobals[@]}
# github.com/rupa/z - oh how i love you
git clone https://github.com/rupa/z.git ~/z
# consider reusing your current .z file if possible. it's painful to rebuild :)
# z is hooked up in .bashrc