2014-06-13 14:27:12 -04:00
|
|
|
#Install server applications
|
|
|
|
while getopts :s option
|
2014-04-19 13:25:29 -04:00
|
|
|
do
|
|
|
|
case "$option" in
|
2014-06-13 14:27:12 -04:00
|
|
|
s)
|
|
|
|
echo "Preparing server installation"
|
|
|
|
sudo apt-get update;sudo apt-get upgrade;sudo apt-get install $(grep -vE "^\s*#" server.txt | tr "\n" " ")
|
2014-05-12 21:03:52 -04:00
|
|
|
;;
|
2014-06-13 14:27:12 -04:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
#Install desktop applications
|
|
|
|
while getopts :d option
|
|
|
|
do
|
|
|
|
case "$option" in
|
2014-05-13 23:39:26 -04:00
|
|
|
d)
|
2014-06-13 14:27:12 -04:00
|
|
|
echo "Installing desktop applications"
|
2014-05-13 23:39:26 -04:00
|
|
|
sudo apt-get update;sudo apt-get upgrade;sudo apt-get install $(grep -vE "^\s*#" desktop.txt | tr "\n" " ")
|
|
|
|
;;
|
2014-06-13 14:27:12 -04:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
#Tmux sync
|
|
|
|
while getopts :t option
|
|
|
|
do
|
|
|
|
case "$option" in
|
|
|
|
t)
|
|
|
|
echo "Syncing tmux"
|
|
|
|
trash ~/.tmux.conf
|
|
|
|
ln -s ${PWD}/tmux.conf ~/.tmux.conf
|
2014-05-13 23:39:26 -04:00
|
|
|
;;
|
2014-06-13 14:27:12 -04:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
#Quit if -o is called
|
|
|
|
while getopts :o option
|
|
|
|
do
|
|
|
|
case "$option" in
|
2014-04-24 23:01:50 -04:00
|
|
|
o)
|
2014-06-13 14:27:12 -04:00
|
|
|
echo "Exiting"
|
2014-04-24 23:01:50 -04:00
|
|
|
exit 0
|
|
|
|
;;
|
2014-04-19 13:25:29 -04:00
|
|
|
esac
|
|
|
|
done
|
2014-06-16 09:41:37 -04:00
|
|
|
rm ~/.gitconfig ~/.vimrc ~/.vimperatorrc ~/.gitignore_global ~/.bashrc
|
2014-04-24 23:01:50 -04:00
|
|
|
ln -s ${PWD}/gitignore_global ~/.gitignore_global
|
|
|
|
ln -s ${PWD}/vimrc ~/.vimrc
|
|
|
|
ln -s ${PWD}/vimperatorrc ~/.vimperatorrc
|
|
|
|
ln -s ${PWD}/gitconfig ~/.gitconfig
|
|
|
|
ln -s ${PWD}/bashrc ~/.bashrc
|
2014-04-19 13:25:29 -04:00
|
|
|
if [ -f ~/.vim/plugin/ ]
|
|
|
|
then
|
|
|
|
echo "Installing plugin folder in ~/.vim/"
|
|
|
|
mkdir -p ~/.vim/plugin/
|
|
|
|
fi
|
|
|
|
if [ -f ~/.vim/plugin/backup/ ]
|
|
|
|
then
|
|
|
|
echo "Installing backup folder in ~/.vim/"
|
|
|
|
mkdir -p ~/.vim/backup/
|
|
|
|
fi
|
|
|
|
if [ -f ~/.vim/plugin/undo/ ]
|
|
|
|
then
|
|
|
|
echo "Installing undo folder in ~/.vim/"
|
|
|
|
mkdir -p ~/.vim/undo/
|
|
|
|
fi
|
|
|
|
if [ -f ~/.vim/tmp/ ]
|
|
|
|
then
|
|
|
|
echo "Installing tmp folder in ~/.vim/"
|
|
|
|
mkdir -p ~/.vim/tmp/
|
|
|
|
fi
|
|
|
|
if [ ! -f ~/.vim/plugin/sessionman.vim ]
|
|
|
|
then
|
|
|
|
echo "Installing sessionman in ~/.vim/plugin/"
|
|
|
|
wget -O ~/.vim/plugin/sessionman.vim http://www.vim.org/scripts/download_script.php?src_id=15599
|
|
|
|
fi
|
2014-06-13 14:27:12 -04:00
|
|
|
#Install vim bundles
|
|
|
|
while getopts :b option
|
|
|
|
do
|
|
|
|
case "$option" in
|
|
|
|
b)
|
|
|
|
if [ -f ~/.vim/bundle/vundle/ ]
|
|
|
|
then
|
|
|
|
echo "Installing vundle"
|
|
|
|
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
|
|
|
|
fi
|
|
|
|
vim +BundleInstall +qa
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
echo "Done syncing"
|