Permalink
Browse files

Merge pull request #1 from ralphtheninja/master

Fixed some file checks
  • Loading branch information...
2 parents ffee2f6 + 89768e6 commit f1a1c823e7a239766423593fe91133077ba26d2c @brianleroux committed May 29, 2012
Showing with 16 additions and 4 deletions.
  1. +16 −4 quick-vim
View
@@ -23,8 +23,14 @@ backup () {
echo 'skipping backup'
else
mkdir -p ./backup
- mv ~/.vimrc ./backup/.vimrc
- mv ~/.vim ./backup/.vim
+ if [ -e ~/.vimrc ]
+ then
+ mv ~/.vimrc ./backup/.vimrc
+ fi
+ if [ -e ~/.vim ]
+ then
+ mv ~/.vim ./backup/.vim
+ fi
fi
}
@@ -51,8 +57,14 @@ uninstall () {
then
rm ~/.vimrc
rm -rf ~/.vim
- mv ./backup/.vimrc ~/.vimrc
- mv ./backup/.vim ~/.vim
+ if [ -e ./backup/.vimrc ]
+ then
+ mv ./backup/.vimrc ~/.vimrc
+ fi
+ if [ -e ./backup/.vim ]
+ then
+ mv ./backup/.vim ~/.vim
+ fi
rm -rf ./backup
fi
}

0 comments on commit f1a1c82

Please sign in to comment.