On 11/02/10 12:27, Pierre Schmitz wrote:
Am Mittwoch, 10. Februar 2010 15:49:35 schrieb Francois Charette:
+    if [ -f $uniondir/build/*-build.log ]; then
+        echo "Moving build log(s) to ${WORKDIR}"
+        mv $uniondir/build/*-{build,package}.log* "${WORKDIR}"
+    fi

What do you think about this:

     for l in "${uniondir}"/build/*-{build,package}.log*; do
         [ -f "$l" ]&&  mv "$l" "${WORKDIR}"
     done

The globing in the if clause will fail if there are for some reason more than
one match. It's also quite common not to have a package.log. (for that case I
have added the check within the for loop)


I think the glob at the end (log*) is unnecessary. The point of this is that there should be no old build logs there.

Otherwise, that seems fine.

Allan

Reply via email to