From a54264963745656e6d4d7b71847af3f4c47360e6 Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Date: Thu, 21 Feb 2013 23:05:57 +0530 Subject: [PATCH] Refactorings on the selfupdate function. --- antigen.zsh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/antigen.zsh b/antigen.zsh index a37b3db..cd208cd 100644 --- a/antigen.zsh +++ b/antigen.zsh @@ -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 -- 2.0.0