From: Michał Kępień Date: Tue, 31 Oct 2017 11:03:04 +0000 (+0100) Subject: [master] Copy nextpart() from conf.sh.in to conf.sh.win32 X-Git-Tag: v9.12.0b2~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=41b1a9854504f1444e8c0d7891ed0845bdc0b315;p=thirdparty%2Fbind9.git [master] Copy nextpart() from conf.sh.in to conf.sh.win32 --- diff --git a/bin/tests/system/conf.sh.win32 b/bin/tests/system/conf.sh.win32 index a84a6306135..43d0fda48cc 100644 --- a/bin/tests/system/conf.sh.win32 +++ b/bin/tests/system/conf.sh.win32 @@ -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 #