]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] Copy nextpart() from conf.sh.in to conf.sh.win32
authorMichał Kępień <michal@isc.org>
Tue, 31 Oct 2017 11:03:04 +0000 (12:03 +0100)
committerMichał Kępień <michal@isc.org>
Tue, 31 Oct 2017 11:03:04 +0000 (12:03 +0100)
bin/tests/system/conf.sh.win32

index a84a6306135be6654d79729911922ea37629132c..43d0fda48ccce236d5946c7c2d22e4c89cbc791d 100644 (file)
@@ -176,6 +176,19 @@ echoinfo () {
         printf "${COLOR_INFO}%s${COLOR_NONE}\n" "$*"
 }
 
+#
+# Useful functions in test scripts
+#
+
+# nextpart: read everything that's been appended to a file since the
+# last time 'nextpart' was called.
+nextpart () {
+    [ -f $1.prev ] || echo "0" > $1.prev
+    prev=`cat $1.prev`
+    awk "FNR > $prev "'{ print }
+         END           { print NR > "/dev/stderr" }' $1 2> $1.prev
+}
+
 #
 # Export command paths
 #