[arch-dev-public] [PATCH] Move build logs to WORKDIR, otherwise they're lost

Pierre Schmitz pierre at archlinux.de
Wed Feb 10 21:27:18 EST 2010

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}"

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)


Pierre Schmitz, https://users.archlinux.de/~pierre

More information about the arch-dev-public mailing list