more portable for which hg test

This commit is contained in:
Matt Johnston 2018-02-28 23:42:57 +08:00
parent a1dcaf82a0
commit a0ab5e86b5

View File

@ -10,7 +10,7 @@ AC_INIT
AC_CONFIG_SRCDIR(buffer.c)
# Record which revision is being built
if which -s hg && test -d "$srcdir/.hg"; then
if test -s "`which hg`" && test -d "$srcdir/.hg"; then
hgrev=`hg id -i -R "$srcdir"`
AC_MSG_NOTICE([Source directory Mercurial base revision $hgrev])
fi