From aa57dd1ff61c41457cf4e87c71b4822cbb789c42 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 3 Jul 2008 12:33:42 +0000 Subject: More unit fixes. --- src/test/units/is_older_than | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/test/units/is_older_than b/src/test/units/is_older_than index 209d75d2..494abbc7 100755 --- a/src/test/units/is_older_than +++ b/src/test/units/is_older_than @@ -11,30 +11,29 @@ TMPDIR=tmp-"$(basename "$0")" # the reference file # # EXAMPLE: if is_older_than a.out *.o ; then ... -is_older_than() { +ref_is_older_than() { local x= ref="$1" shift for x; do [ "${x}" -nt "${ref}" ] && return 0 - [ -d "${x}" ] && is_older_than "${ref}" "${x}"/* && return 0 + [ -d "${x}" ] && ref_is_older_than "${ref}" "${x}"/* && return 0 done return 1 } rm -rf "${TMPDIR}" mkdir "${TMPDIR}" -ln -s ../"${RCDIR}"/rc "${TMPDIR}"/is_older_than do_test() { local r1= r2= - is_older_than "$@" + ref_is_older_than "$@" r1=$? - ./"${TMPDIR}"/is_older_than "$@" + is_older_than "$@" r2=$? - [ -n "${VERBOSE}" ] && echo "baselayout = $r1 | OpenRC = $r2" + [ -n "${VERBOSE}" ] && echo "reference = $r1 | OpenRC = $r2" [ $r1 = $r2 ] } -- cgit v1.2.3