From 98d73965b6c42cd7670fcf799e5e9b51177b1a9b Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Wed, 27 Jan 2010 19:34:37 +0530 Subject: [PATCH] easy install: two rc file update bugs fixed The "msysgit doesnt have 'comm'" commit (from 2 days ago), had 2 bugs: - (smaller) the "+++" which was part of the diff header was triggering a spurious rc file "new variables" warning, but there were no actual variables to update - (bigger) worse, the grep command, when there were no matches, coupled with the "set -e" to kill the program right there (ouch!) --- src/gl-easy-install | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gl-easy-install b/src/gl-easy-install index 9887d70..35c31e2 100755 --- a/src/gl-easy-install +++ b/src/gl-easy-install @@ -307,7 +307,9 @@ Let's see if we can use that instead of the default one..." # msysgit doesn't have "comm". diff is not ideal for our purposes # because we only care about differences in one direction, but we'll # have to make do... - diff -u $tmpgli/glrc.old $tmpgli/glrc.new | grep '^+' > $tmpgli/glrc.comm13 + set +e + diff -u $tmpgli/glrc.old $tmpgli/glrc.new | grep '^+.*\$' > $tmpgli/glrc.comm13 + set -e if [[ ! -s $tmpgli/glrc.comm13 ]] then [[ $quiet == -q ]] || ${VISUAL:-${EDITOR:-vi}} $tmpgli/.gitolite.rc