Gentoo Archives: gentoo-dev

From: Ionen Wolkens <ionen@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH 1/2] esed.eclass: new eclass
Date: Tue, 31 May 2022 13:45:26
Message-Id: YpYb6qKoSEzN4Uva@eversor
In Reply to: [gentoo-dev] [PATCH 1/2] esed.eclass: new eclass by Ionen Wolkens
1 On Tue, May 31, 2022 at 07:23:18AM -0400, Ionen Wolkens wrote:
2 > + if [[ ${contents[i]} != "${newcontents}" ]]; then
3 > + changed=1
4 > + [[ -v verbose ]] || break
5 > + fi
6 > +
7 > + [[ -v verbose ]] &&
8 > + diff -u --color --label="${files[i]}"{,} \
9 > + <(echo "${contents[i]}") <(echo "${newcontents}")
10
11 self nitpick, didn't think much of these given optional but diff has
12 nothing to say if contents == newcontents so will replace with:
13
14 if [[ ${contents[i]} != "${newcontents}" ]]; then
15 changed=1
16
17 [[ -v verbose ]] || break
18
19 diff -u --color --label="${files[i]}"{,} \
20 <(echo "${contents[i]}") <(echo "${newcontents}")
21 fi
22
23 > + [[ ${contents} != "${newcontents}" ]] && changed=1
24 > +
25 > + [[ -v verbose ]] &&
26 > + diff -u --color --label="${files[*]}" --label="${_esed_output}" \
27 > + <(echo "${contents}") <(echo "${newcontents}")
28
29 and:
30
31 if [[ ${contents} != "${newcontents}" ]]; then
32 changed=1
33
34 [[ -v verbose ]] &&
35 diff -u --color --label="${files[*]}" --label="${_esed_output}" \
36 <(echo "${contents}") <(echo "${newcontents}")
37 fi
38
39 (updated on github PR)
40
41 --
42 ionen

Attachments

File name MIME type
signature.asc application/pgp-signature