directory creation for vim

This commit is contained in:
Dirk Alders 2023-04-30 14:56:39 +02:00
parent 064649664b
commit 164aac7256

10
add_vim
View File

@ -2,6 +2,15 @@
# #
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" 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 if [[ (-e ~/.vimrc || -e ~/.vim/skeletons) ]]; then
echo "A vim configuration already exists (~/.vimrc or ~/.vim/skeletons)" echo "A vim configuration already exists (~/.vimrc or ~/.vim/skeletons)"
echo "Remove this configuration and start the script again" echo "Remove this configuration and start the script again"
@ -10,4 +19,3 @@ else
ln -vs $SCRIPTPATH/.vimrc ~/.vimrc ln -vs $SCRIPTPATH/.vimrc ~/.vimrc
ln -vs $SCRIPTPATH/.vim/skeletons ~/.vim/skeletons ln -vs $SCRIPTPATH/.vim/skeletons ~/.vim/skeletons
fi fi