-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·63 lines (51 loc) · 1.82 KB
/
install.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
#!/usr/bin/env bash
set -e
BACKUPDIR="$HOME/dotfiles-bak"
rm -rf $BACKUPDIR
mkdir -p $BACKUPDIR
for file in essentials/*; do
SOURCE="$PWD/$file"
TARGET="$HOME/.$(basename $file)"
if [ -f $TARGET ] || [ -L $TARGET ] ; then
echo "Backing up existing $TARGET"
mv $TARGET $BACKUPDIR
fi
echo "Symlinking $SOURCE to $HOME"
ln -s $SOURCE $TARGET
done
if [ ! -d ~/.vim/bundle/Vundle.vim ]; then
echo "Installing VIM plugins with vundle"
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vim +PluginInstall +qall
else
echo "Skipping VIM plugins"
fi
if [ $SHELL != '/bin/zsh' ]; then
echo "Make zsh the default shell"
chsh -s $(which zsh)
else
echo "zsh is already the default shell"
fi
echo "Install oh-my-zsh"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" || true
echo "Add startup scripts to zsh"
echo "if [ -f $HOME/.startup ]; then; source $HOME/.startup; fi" >> ~/.zshrc
echo "if [ -f $HOME/.secret ]; then; source $HOME/.secret; fi" >> ~/.zshrc
# Copy sample gitconfig
GITSOURCE="$PWD/gitconfig.sample"
GITTARGET="$HOME/.gitconfig"
if [ -f $GITTARGET ] || [ -L $GITTARGET]; then
mv $GITTARGET $BACKUPDIR
fi
cp $GITSOURCE $GITTARGET
echo "Installing monokai.terminal theme"
rm -rf ~/tmp/monokai.terminal || true
mkdir -p ~/tmp && git clone git@github.com:stephenway/monokai.terminal.git ~/tmp/monokai.terminal
open ~/tmp/monokai.terminal/Monokai.terminal
echo "Open Terminal settings and set Monokai.terminal as the default in Profiles"
echo "Other items:"
echo
echo "- Install HomeBrew: https://brew.sh"
echo "- Install Volta: https://docs.volta.sh/guide/getting-started"
echo "- Install VSCode: https://code.visualstudio.com/download"
echo "- Setup SSH Keys: https://help.github.com/articles/adding-a-new-ssh-key-to-the-ssh-agent"