Correct use of sh if

This commit is contained in:
Bill Somerville 2020-10-17 13:35:16 +01:00
parent d81a027063
commit e149c9980f
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F

View File

@ -108,8 +108,8 @@ hamlibdatetime.h: FORCE
if test -x $(top_srcdir)/.git ; then \
echo "/* This date time is from the last non-merge commit to Hamlib. */" > $@.tmp ;\
echo "#define HAMLIBDATETIME "\"$$(TZ=UTC git --git-dir=$(top_srcdir)/.git log --no-merges --date='format-local:%a %b %d %H:%M:%S %Y %z SHA=' --format='%cd' -n 1)$$(git --git-dir=$(top_srcdir)/.git log --no-merges | grep commit | head -n 1 | cut -c8-13)\" >> $@.tmp ;\
if test $$(diff $@.tmp $@) ; then \
mv $@.tmp $@ ;\
if $$(diff $@.tmp $@) ; then \
mv -f $@.tmp $@ ;\
cp -f $@ $(top_srcdir)/tests/$(@F) ;\
fi \
fi