forked from chrispappas/dev-workstation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup
executable file
·58 lines (47 loc) · 1.26 KB
/
setup
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
#!/bin/sh
if [ -x /usr/local/bin/brew ];
then
echo "Skipping install of brew. It is already installed.";
echo "Updating brew..."
brew update;
echo "Updated brew."
else
echo "Installing brew...";
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)";
if [ -x /usr/local/bin/brew ];
then
echo "Installed brew";
else
exit 1;
fi
fi
echo "Running brew bundle...";
brew bundle;
echo "brew bundle complete";
# do some ruby specific stuff
RUBY_VERSION=2.5.1
echo "🦄 ruby" $RUBY_VERSION
rbenv install -s $RUBY_VERSION
rbenv global $RUBY_VERSION
# bash-it
read -p "Install bash-it? y/n " -n 1 -r
echo # move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo "Installing bash-it"
if [ -x ~/.bash_it/install.sh ]; then
echo ", since it's already installed.";
else
git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it
~/.bash_it/install.sh
fi
else
echo "Skipping install of bash-it"
fi
if [ -x ~/.vimrc ];
then
echo "Skipping vim config, since .vimrc already exists.";
else
curl -s 'http://vim-bootstrap.com/generate.vim' --data 'langs=javascript&langs=php&langs=html&langs=ruby&langs=go&editor=vim' > ~/.vimrc
fi
echo "Setup complete";