On Fri, 18 Sep 2015 10:37:04 +0200
hasufell <hasuf...@gentoo.org> wrote:

> On 09/18/2015 10:30 AM, Alexis Ballier wrote:
> > On Thu, 17 Sep 2015 23:17:11 +0000 (UTC)
> > Duncan <1i5t5.dun...@cox.net> wrote:
> > 
> >> Alexis Ballier posted on Thu, 17 Sep 2015 18:36:06 +0200 as
> >> excerpted:
> >>
> >>> if [ "${PV#9999}" != "${PV}" ] ; then
> >>>   SCM="git-r3"
> >>> fi
> >>
> >> [and elsewhere]
> >>
> >> I've seen this asked in other eclass review contexts, but not for 
> >> awhile...
> >>
> >> Since gentoo requires bash, why are you using old borne shell 
> >> compatibility test logic?  Why not use [[ ]] tests and avoid the
> >> need for the "", since bash then can treat variables as a unit and
> >> quotes are only needed if the tested strings include
> >> variable-external space (thus avoiding quote-logic errors if you
> >> accidentally forget the quotes)?
> >>
> > 
> > just a matter of taste I'd say: I'm used to write portable shell
> > code since, as you say, sometimes bash is not necessarily there, or
> > worse: in some worlds, gpl3, hence bash, is just banned.
> > 
> > because of this, I'm more used to the [ "" ] constructs and hence
> > find it prettier :) highly subjective though.
> > 
> > also, you can see the quotes around ${PV} aren't useful in that
> > context either, which is again just a matter of what my eyes are
> > used to see :)
> > 
> > Alexis.
> > 
> > [...]
> > 
> 
> eclasses (and ebuilds) are always bash in gentoo and I'd vote for
> writing "true" bash code, to stay consistent
> 

it is "true" bash :)

Reply via email to