1
0
my_config/add_vim

22 Zeilen
522 B
Bash
Ausführbare Datei

#!/bin/zsh
#
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
if [[ ! -e ~/.vim ]]; then
mkdir -v ~/.vim
fi
if [[ ! -e ~/.cache/vim ]]; then
mkdir -v ~/.cache/vim
fi
if [[ (-e ~/.vimrc || -e ~/.vim/skeletons) ]]; then
echo "A vim configuration already exists (~/.vimrc or ~/.vim/skeletons)"
echo "Remove this configuration and start the script again"
else
echo "Creating base links"
ln -vs $SCRIPTPATH/.vimrc ~/.vimrc
ln -vs $SCRIPTPATH/.vim/skeletons ~/.vim/skeletons
fi