Useless use of cat aware goes to: Re: buildd questions
On Tue, 11 Feb 2003, Graham Wilson wrote:
> for patch in debian/patches/*; do \
> cat $patch | patch -p1; \
> done
for patch in debian/patches/*; do \
patch -p1 < $patch; \
done
Alternatives:
==
cat debian/patches/* | patch -p1
==
set -e; \
for patch in debian/patches/*; do \
printf "Applying patch $patch: "; \
if patch --dry-run -p1 < $patch; then \
patch -p1 < $patch; \
printf "successfull.\n"; \
else \
printf "failed.\nPatch output follows:\n"; \
patch --dry-run -p1 < $patch; \
fi \
done
==
Note, that the second --dry-run call will fail, and because -e is in effect,
the shell scriptlet will abort, and so will make.
You're original example didn't have set -e. If it did, then I doubt it would
have even continued building, only to fail later on.
Reply to: