[arch-dev-public] [PATCH] Move build logs to WORKDIR, otherwise they're lost
Firmicus
Firmicus at gmx.net
Thu Feb 11 02:02:40 EST 2010
On 11/02/2010 03:37, Allan McRae wrote:
> 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)
Yes. Better.
> I think the glob at the end (log*) is unnecessary. The point of this
> is that there should be no old build logs there.
>
Agreed again. Should I send a corrected patch?
More information about the arch-dev-public
mailing list