comparison 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
comparison
equal deleted inserted replaced
1248:03447ed1115d 1249:6cb8edbda6d2
6 fi 6 fi
7 7
8 if which hg > /dev/null 2>&1; then 8 if which hg > /dev/null 2>&1; then
9 cs=$(hg id 2> /dev/null | cut -d' ' -f1) 9 cs=$(hg id 2> /dev/null | cut -d' ' -f1)
10 if test $? -eq 0; then 10 if test $? -eq 0; then
11 grep -q "$cs" hgcset.h > /dev/null 2>&1 || \ 11 if [ x"$cs" != x ]; then
12 echo "#define HGCSET \"$cs\"" > hgcset.h 12 grep -q "$cs" hgcset.h > /dev/null 2>&1 || \
13 exit 0 13 echo "#define HGCSET \"$cs\"" > hgcset.h
14 exit 0
15 fi
14 fi 16 fi
15 fi 17 fi
16 18
17 echo > hgcset.h 19 echo > hgcset.h