Mercurial > ~mikael > mcabber > hg
diff mcabber/hgcset.sh @ 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 | e6d42f239541 |
children | 41c26b7d2890 |
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