浏览代码

Fix some tests

If the "Final content" line was the very first line, the sed would
delete everything.
Richard Laager 8 年之前
父节点
当前提交
d68650f766
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      examples/Makefile.am

+ 1 - 1
examples/Makefile.am

@@ -40,7 +40,7 @@ EXTRA_DIST = $(examples_DATA)
 .cfg.bin: ../src/docsis $(srcdir)/keyfile Makefile
 	export MIBDIRS="`net-snmp-config --default-mibdirs`:$(top_srcdir)/mibs:$(top_srcdir)/mibs/iana:$(top_srcdir)/mibs/ietf" ; \
 		../src/docsis -e $< $(srcdir)/keyfile $@ | \
-		sed "1,/^Final content/d" > $@.1.txt ; \
+		sed -n '/^Final content/,$$p' | grep -v "^Final content" > $@.1.txt ; \
 		../src/docsis -d $@ > $@.2.txt ; \
 		if cmp $@.1.txt $@.2.txt && cmp $(<:.cfg=.txt) $@.2.txt ; then \
 			rm -f $@.1.txt $@.2.txt ; \