11 Feb
2010
11 Feb
'10
2:27 a.m.
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) -- Pierre Schmitz, https://users.archlinux.de/~pierre