1 |
On Sat, 14 Nov 2015 10:51:03 -0800 |
2 |
Zac Medico <zmedico@g.o> wrote: |
3 |
|
4 |
> On 11/14/2015 10:37 AM, Michał Górny wrote: |
5 |
> > Ensure that patch files are sorted lexically even when both *.diff |
6 |
> > and *.patch files co-exist within a single directory. |
7 |
> > --- |
8 |
> > bin/phase-helpers.sh | 11 ++++++++--- |
9 |
> > 1 file changed, 8 insertions(+), 3 deletions(-) |
10 |
> > |
11 |
> > diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh |
12 |
> > index b79884f..1d3c976 100644 |
13 |
> > --- a/bin/phase-helpers.sh |
14 |
> > +++ b/bin/phase-helpers.sh |
15 |
> > @@ -1043,12 +1043,17 @@ if ___eapi_has_eapply; then |
16 |
> > local LC_ALL=POSIX |
17 |
> > local prev_shopt=$(shopt -p nullglob) |
18 |
> > shopt -s nullglob |
19 |
> > - files=( "${f}"/*.{patch,diff} ) |
20 |
> > + local f |
21 |
> > + for f in "${1}"/*; do |
22 |
> > + if [[ ${f} == *.diff || ${f} == *.patch ]]; then |
23 |
> |
24 |
> Maybe use [[ ${f} =~ \.(diff|patch)$ ]] instead? Either one is fine, I |
25 |
> suppose. |
26 |
|
27 |
Nah, /me regex hater these days. |
28 |
|
29 |
-- |
30 |
Best regards, |
31 |
Michał Górny |
32 |
<http://dev.gentoo.org/~mgorny/> |