Improve vim sync script
This commit is contained in:
parent
869762c9ae
commit
f0d80c41d6
16
bin/pull-vim
Normal file
16
bin/pull-vim
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copies vim data from the home directory to the dotfiles repo.
|
||||
|
||||
set -e
|
||||
|
||||
src="$HOME/.vim"
|
||||
dest="$HOME/.dotfiles/vim/"
|
||||
|
||||
if [ -d $src ]; then
|
||||
[ -d "$src/spell" ] && echo "Syncing user dictionary" && cp -r "$src/spell" $dest
|
||||
[ -d "$src/colors" ] && echo "Syncing user colors" && cp -r "$src/colors" $dest
|
||||
[ -d "$src/after" ] && echo "Syncing after directory" && cp -r "$src/after" $dest
|
||||
[ -d "$src/templates" ] && echo "Syncing templates" && cp -r "$src/templates" $dest
|
||||
[ -d "$src/ftdetect" ] && echo "Syncing ftdetect" && cp -r "$src/ftdetect" $dest
|
||||
fi
|
16
bin/push-vim
Normal file
16
bin/push-vim
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copies vim data from the dotfiles repo to the home directory.
|
||||
|
||||
set -e
|
||||
|
||||
src="$HOME/.dotfiles/vim"
|
||||
dest="$HOME/.vim/"
|
||||
|
||||
if [ -d $src ]; then
|
||||
[ -d "$src/spell" ] && echo "Syncing user dictionary" && cp -r "$src/spell" $dest
|
||||
[ -d "$src/colors" ] && echo "Syncing user colors" && cp -r "$src/colors" $dest
|
||||
[ -d "$src/after" ] && echo "Syncing after directory" && cp -r "$src/after" $dest
|
||||
[ -d "$src/templates" ] && echo "Syncing templates" && cp -r "$src/templates" $dest
|
||||
[ -d "$src/ftdetect" ] && echo "Syncing ftdetect" && cp -r "$src/ftdetect" $dest
|
||||
fi
|
11
bin/sync-vim
11
bin/sync-vim
|
@ -1,11 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ ! -d "~/.vim" ]; then
|
||||
echo "Syncing user dictionary" && cp -r ~/.vim/spell ~/.dotfiles/vim/
|
||||
echo "Syncing user colors" && cp -r ~/.vim/colors ~/.dotfiles/vim/
|
||||
echo "Syncing after directory" && cp -r ~/.vim/after ~/.dotfiles/vim/
|
||||
echo "Syncing templates" && cp -r ~/.vim/templates ~/.dotfiles/vim/
|
||||
echo "Syncing ftdetect" && cp -r ~/.vim/ftdetect ~/.dotfiles/vim/
|
||||
fi
|
Loading…
Reference in New Issue
Block a user