43 lines
969 B
Bash
Executable file
43 lines
969 B
Bash
Executable file
#!/bin/bash
|
|
# Setup script for vim & tmux
|
|
function get_path {
|
|
SCRIPT=`realpath $0`
|
|
SCRIPTPATH=`dirname $SCRIPT`
|
|
}
|
|
|
|
function user_config {
|
|
|
|
if [ 'dpkg -l curl' == 1 ]; then
|
|
echo 'Curl not installed, installing....'
|
|
apt-get install -y curl
|
|
#echo 'Exiting...'
|
|
#exit 1
|
|
fi
|
|
|
|
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
|
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
|
|
# Create symlinks
|
|
get_path
|
|
echo 'Creating systemlinks'
|
|
ln -s $SCRIPTPATH/vim/.vimrc $HOME/;
|
|
ln -s $SCRIPTPATH/tmux/.tmux.conf $HOME/;
|
|
mkdir -p $HOME/.vim/colors
|
|
cp $SCRIPTPATH/vim/colors/* $HOME/.vim/colors
|
|
|
|
}
|
|
|
|
function powerline_fonts {
|
|
git clone https://github.com/powerline/fonts.git $HOME/.fonts
|
|
$HOME/.fonts/install.sh
|
|
}
|
|
|
|
user_config
|
|
echo 'Dont forget to run :PlugInstall inside vim!'
|
|
|
|
echo -n 'Extra fonts? [y/n]'
|
|
read FONTS
|
|
|
|
if [ "$FONTS" == "y" ] ;then
|
|
powerline_fonts
|
|
fi
|