[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    Re: [gentoo-dev] [PATCH 1/2] esed.eclass: new eclass
From:       Ionen Wolkens <ionen () gentoo ! org>
Date:       2022-05-31 13:45:14
Message-ID: YpYb6qKoSEzN4Uva () eversor
[Download RAW message or body]


On Tue, May 31, 2022 at 07:23:18AM -0400, Ionen Wolkens wrote:
> +			if [[ ${contents[i]} != "${newcontents}" ]]; then
> +				changed=1
> +				[[ -v verbose ]] || break
> +			fi
> +
> +			[[ -v verbose ]] &&
> +				diff -u --color --label="${files[i]}"{,} \
> +					<(echo "${contents[i]}") <(echo "${newcontents}")

self nitpick, didn't think much of these given optional but diff has
nothing to say if contents == newcontents so will replace with:

if [[ ${contents[i]} != "${newcontents}" ]]; then
	changed=1

	[[ -v verbose ]] || break

	diff -u --color --label="${files[i]}"{,} \
		<(echo "${contents[i]}") <(echo "${newcontents}")
fi

> +		[[ ${contents} != "${newcontents}" ]] && changed=1
> +
> +		[[ -v verbose ]] &&
> +			diff -u --color --label="${files[*]}" --label="${_esed_output}" \
> +				<(echo "${contents}") <(echo "${newcontents}")

and:

if [[ ${contents} != "${newcontents}" ]]; then
	changed=1

	[[ -v verbose ]] &&
		diff -u --color --label="${files[*]}" --label="${_esed_output}" \
			<(echo "${contents}") <(echo "${newcontents}")
fi

(updated on github PR)

-- 
ionen

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic