[arch-dev-public] [PATCH] Move build logs to WORKDIR, otherwise they're lost
Allan McRae
allan at archlinux.org
Wed Feb 10 21:37:54 EST 2010
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
More information about the arch-dev-public
mailing list