Symlinks from script directory
This commit is contained in:
parent
b9793bc5f1
commit
d2a43ad7a1
1 changed files with 43 additions and 17 deletions
|
|
@ -3,30 +3,56 @@
|
|||
echo -n 'Systemwide or user specific configuration? [s/u]'
|
||||
read FUNCTION
|
||||
|
||||
if ['$FUNCTION' == 's'] ;then
|
||||
system_wide
|
||||
elif ['$FUNCTION' == 'u'] ;then
|
||||
user_config
|
||||
fi
|
||||
|
||||
echo -n 'Extra fonts? [y/n]'
|
||||
read FONTS
|
||||
|
||||
if ['$FONTS' == 'y'] ;then
|
||||
powerline_fonts
|
||||
fi
|
||||
function get_path {
|
||||
SCRIPT=`realpath $0`
|
||||
SCRIPTPATH=`dirname $SCRIPT`
|
||||
}
|
||||
|
||||
function system_wide {
|
||||
ln -s vim/.vimrc /etc/vim/vimrc;
|
||||
ln -s tmux/.tmux.conf /etc/tmux.conf;
|
||||
get_path
|
||||
# Change branch for plugin directory
|
||||
sudo git checkout -b system_wide
|
||||
echo 'Creating systemlinks'
|
||||
sudo ln -s $SCRIPTPATH/vim/.vimrc /etc/vim/vimrc.local;
|
||||
sudo ln -s $SCRIPTPATH/tmux/.tmux.conf /etc/tmux.conf;
|
||||
sudo mkdir /etc/vim/colors
|
||||
sudo cp $SCRIPTPATH/vim/colors/* /etc/vim/colors
|
||||
|
||||
# Download vim-plug
|
||||
curl -fLo /etc/vim/autoload/plug.vim --create-dirs \
|
||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
}
|
||||
|
||||
function user_config {
|
||||
ln -s vim/.vimrc $HOME/;
|
||||
ln -s tmux/.tmux.conf $HOME/;
|
||||
get_path
|
||||
echo 'Creating systemlinks'
|
||||
ln -s $SCRIPTPATH/vim/.vimrc $HOME/;
|
||||
ln -s $SCRIPTPATH/tmux/.tmux.conf $HOME/;
|
||||
mkdir -p $HOME/.vim/colors
|
||||
sudo cp $SCRIPTPATH/vim/colors/* $HOME/.vim/colors
|
||||
|
||||
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
|
||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
}
|
||||
|
||||
function powerline_fonts {
|
||||
git clone https://github.com/powerline/fonts.git $HOME/.fonts
|
||||
./$HOME/.fonts/install.sh
|
||||
$HOME/.fonts/install.sh
|
||||
}
|
||||
|
||||
if [ "$FUNCTION" == "s" ] ;then
|
||||
system_wide
|
||||
elif [ "$FUNCTION" == "u" ] ;then
|
||||
user_config
|
||||
fi
|
||||
|
||||
|
||||
|
||||
echo 'Dont forget to run :PlugInstall inside vim!'
|
||||
|
||||
echo -n 'Extra fonts? [y/n]'
|
||||
read FONTS
|
||||
|
||||
if [ "$FONTS" == "y" ] ;then
|
||||
powerline_fonts
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue