Mercurial > hg
changeset 1249:6cb8edbda6d2 0.9.3
Fix hgcset.sh when Mercurial is installed but there is no repository
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Tue, 19 Jun 2007 22:09:10 +0200 |
parents | 03447ed1115d |
children | 2c7a6c1d2622 |
files | mcabber/hgcset.sh |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/hgcset.sh Tue Jun 19 21:26:58 2007 +0200 +++ b/mcabber/hgcset.sh Tue Jun 19 22:09:10 2007 +0200 @@ -8,9 +8,11 @@ if which hg > /dev/null 2>&1; then cs=$(hg id 2> /dev/null | cut -d' ' -f1) if test $? -eq 0; then - grep -q "$cs" hgcset.h > /dev/null 2>&1 || \ - echo "#define HGCSET \"$cs\"" > hgcset.h - exit 0 + if [ x"$cs" != x ]; then + grep -q "$cs" hgcset.h > /dev/null 2>&1 || \ + echo "#define HGCSET \"$cs\"" > hgcset.h + exit 0 + fi fi fi