Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixed some file checks #1

Merged
merged 1 commit into from

2 participants

@ralphtheninja

It might be the case that the computer where quick-vim is being installed
doesn't even have a default .vimrc and .vim files.

Lars-Magnus Skog Check file existence during install and uninstall
It might be the case that the computer where quick-vim is being installed
doesn't even have a default .vimrc and .vim files.
89768e6
@brianleroux brianleroux merged commit f1a1c82 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 28, 2012
  1. Check file existence during install and uninstall

    Lars-Magnus Skog authored
    It might be the case that the computer where quick-vim is being installed
    doesn't even have a default .vimrc and .vim files.
This page is out of date. Refresh to see the latest.
Showing with 16 additions and 4 deletions.
  1. +16 −4 quick-vim
View
20 quick-vim
@@ -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
}
Something went wrong with that request. Please try again.