Просмотр исходного кода

Use '+%F %T%z' to format the timestamp

Option `--rfc-3339` is specific to GNU Coreutils' date(1). This change
fixes the use of `make summary` on other platforms such as FreeBSD.

The underscore is integrated to the tiem format at the same time; no
need for an additional $(subst).
Jean-Sébastien Pédron 9 лет назад
Родитель
Сommit
f03a2268c0
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Makefile

+ 1 - 1
Makefile

@@ -48,7 +48,7 @@ summary:
 	@touch test/logs/latest.log test/packages/errors.log
 	@touch test/logs/latest.log test/packages/errors.log
 	-@sort test/packages/errors.log | diff test/logs/latest.log -
 	-@sort test/packages/errors.log | diff test/logs/latest.log -
 	@sort test/packages/errors.log > test/logs/latest.log
 	@sort test/packages/errors.log > test/logs/latest.log
-	@cp test/logs/latest.log "test/logs/$(subst $(empty) $(empty),_,$(shell date --rfc-3339 seconds))"
+	@cp test/logs/latest.log "test/logs/$(shell date '+%F_%T%z')"
 
 
 search:
 search:
 	@$(MAKE) --no-print-directory \
 	@$(MAKE) --no-print-directory \