XXX
#!/bin/bash 1 2 # refer spf13-vim bootstrap.sh` 3 BASEDIR=$(dirname $0) 4 cd $BASEDIR 5 CURRENT_DIR=`pwd` 6 7 lnif() { 8 if [ -e "$1" ]; then 9 ln -sf "$1" "$2" 10 fi 11 } 12 13 echo "Step1: backing up current vim config" 14 today=`date +%Y%m%d` 15 for i in $HOME/.vim $HOME/.vimrc $HOME/.gvimrc $HOME/.vimrc.bundles; do [ -e $i ] && [ ! -L $i ] && mv $i $i.$today; done 16 for i in $HOME/.vim $HOME/.vimrc $HOME/.gvimrc $HOME/.vimrc.bundles; do [ -L $i ] && unlink $i ; done 17