-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.sh
executable file
·48 lines (38 loc) · 1.01 KB
/
setup.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
#!/bin/bash
# Install
# apt-get install git ack-grep -y
PWD=`pwd`
platform='unknown'
unamestr=`uname`
if [[ "$unamestr" == 'Linux' ]]; then
platform='linux'
elif [[ "$unamestr" == 'FreeBSD' ]]; then
platform='freebsd'
fi
TMPFILE=`mktemp`
PWD=`pwd`
wget "$1" -O $TMPFILE
unzip -d $PWD $TMPFILE
rm $TMPFILE
# setup symlinks
confirm () {
# call with a prompt string or use a default
read -r -p "${1:-Are you sure? [Y/n]}? " response
response=${response:-'Y'}
case $response in
[yY])
true
;;
*)
false
;;
esac
}
function installVimBinaryPackages {
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
}
confirm "Install Vim Binary Addons" && installVimBinaryPackages
confirm "Symlink vim" && ln -s $PWD/vim/.vimrc ~/.vimrc
confirm "Symlink tmux" && ln -s $PWD/tmux/.tmux.conf ~/.tmux.conf
confirm "Symlink git" && ln -s $PWD/git/.gitconfig ~/.gitconfig
confirm "Symlink zsh" && ln -s $PWD/zsh/.zshrc ~/.zshrc