Greg Wooledge <g...@wooledge.org> writes:

> On Mon, Jan 24, 2022 at 05:01:21AM -0500, gene heskett wrote:
> > gene@coyote:~/Debian-arm/linux$ patch -p1  ../patches/*.patch
> 
> That's not how you do it.  patch(1) can only accept one patch at a time,
> and it expects to see it on standard input.
> 
> for p in ../patches/*.patch; do patch -p1 < "$p"; done

You can even do the somewhat easier

    cat ../patches/*.patch | patch -p1

which will do the same.  

However, often the order of patches is important when some patch
depends on another being applied before.  Then *.patch will probably
not work since it applies patches in alphabetical order.  That's, why
I also like to work with quilt a lot.  With quilt, the patches/series
file describes the patch series, i.e. the order in which patches have
to be applied.  With "quilt push" and "quilt pop" you can apply and
remove single patches, or go to a specific patch with "quilt push
<name>" (or "quilt pop <name>"), or apply/remove all patches with
"quilt push -a" and "quilt pop -a".  Always in the correct order.

urs

Reply via email to