Permalink
Browse files

Refactorings on the selfupdate function.

  • Loading branch information...
1 parent 3e92539 commit a54264963745656e6d4d7b71847af3f4c47360e6 @sharat87 sharat87 committed Feb 21, 2013
Showing with 7 additions and 5 deletions.
  1. +7 −5 antigen.zsh
View
@@ -292,12 +292,14 @@ antigen-revert () {
}
+# Update (with `git pull`) antigen itself.
+# TODO: Once update is finished, show a summary of the new commits, as a kind of
+# "what's new" message.
antigen-selfupdate () {
- (
- cd $_ANTIGEN_INSTALL_DIR
- # Sanity checks
- if [ ! -d .git ]; then
- echo "antigen is not under git CVS"
+ ( cd $_ANTIGEN_INSTALL_DIR
+ if [[ ! -d .git ]]; then
+ echo "Your copy of antigen doesn't appear to be a git clone. " \
+ "The 'selfupdate' command cannot work in this case."
return 1
fi
git pull

0 comments on commit a542649

Please sign in to comment.