Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 34 lines (30 sloc) 815 Bytes
#!/bin/sh
cd $(dirname "$0")
register_file() {
file="$1"
[ -z "$file" ] && echo "Error: No file name provided." 1>&2 && return
[ -h "$HOME/$file" -o ! -e "$HOME/$file" ] && rm -f "$HOME/$file"
if [ "$file" = ".vim" ]; then
if [ ! -e "$HOME/$file" ]; then
ln -s "$PWD" "$HOME/$file"
fi
elif [ "$file" = ".vimrc" ]; then
if [ ! -e "$HOME/$file" ]; then
ln -s "$PWD/vimrc" "$HOME/$file"
fi
elif [ "$file" = ".vimpagerrc" ]; then
if [ ! -e "$HOME/$file" ]; then
ln -s "$PWD/vimpagerrc" "$HOME/$file"
fi
else
if [ ! -e "$HOME/$file" ]; then
ln -s "$PWD/$file" "$HOME/$file"
fi
fi
}
for i in .vim .vimrc .vimpagerrc; do
register_file $i
done
if [ ! -e config/personal.vim ] && [ -e config/template_personal.vim ]; then
cp -v -L config/template_personal.vim config/personal.vim
fi