Re: [gentoo-dev] RFC: esethome

2012-06-15 Thread Peter Stuge
Mike Gilbert wrote: > > [] is shorthand for test. Both test and [[]] in my man bash read: > > > > --8<-- > > Expressions are composed of the primaries described .. under > > CONDITIONAL EXPRESSIONS. > > -->8-- And the next sentence is exactly what you wrote. :) "Word splitting and pathname expans

Re: [gentoo-dev] RFC: esethome

2012-06-15 Thread Mike Gilbert
On Fri, Jun 15, 2012 at 10:05 AM, Peter Stuge wrote: > Fabian Groffen wrote: >> > > >>> +       if [[ ! -n $(egetent passwd "${euser}") ]] ; then >> > > >> >> > > >> "! -n" -> "-z" >> > > > >> > > > Does the $() argument ever need to be double quoted, or do all >> > > > versions of bash actually h

Re: [gentoo-dev] RFC: esethome

2012-06-15 Thread Peter Stuge
Fabian Groffen wrote: > > > >>> + if [[ ! -n $(egetent passwd "${euser}") ]] ; then > > > >> > > > >> "! -n" -> "-z" > > > > > > > > Does the $() argument ever need to be double quoted, or do all > > > > versions of bash actually have the string argument optional even > > > > though that'

Re: [gentoo-dev] RFC: esethome

2012-06-15 Thread Fabian Groffen
On 15-06-2012 15:41:03 +0200, Peter Stuge wrote: > Ian Stakenvicius wrote: > > > Mike Frysinger wrote: > > >>> + # lets see if the username already exists + if [[ > > >>> ! -n $(egetent passwd "${euser}") ]] ; then > > >> > > >> "! -n" -> "-z" > > > > > > Does the $() argument ever ne

Re: [gentoo-dev] RFC: esethome

2012-06-15 Thread Peter Stuge
Ian Stakenvicius wrote: > > Mike Frysinger wrote: > >>> + # lets see if the username already exists + if [[ > >>> ! -n $(egetent passwd "${euser}") ]] ; then > >> > >> "! -n" -> "-z" > > > > Does the $() argument ever need to be double quoted, or do all > > versions of bash actually

Re: [gentoo-dev] RFC: esethome

2012-06-15 Thread Fabian Groffen
On 15-06-2012 09:35:38 -0400, Ian Stakenvicius wrote: > On 15/06/12 09:27 AM, Peter Stuge wrote: > > Mike Frysinger wrote: > >>> + # lets see if the username already exists + if [[ > >>> ! -n $(egetent passwd "${euser}") ]] ; then > >> > >> "! -n" -> "-z" > > > > Does the $() argument

Re: [gentoo-dev] RFC: esethome

2012-06-15 Thread Ian Stakenvicius
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 15/06/12 09:27 AM, Peter Stuge wrote: > Mike Frysinger wrote: >>> + # lets see if the username already exists + if [[ >>> ! -n $(egetent passwd "${euser}") ]] ; then >> >> "! -n" -> "-z" > > Does the $() argument ever need to be doub

Re: [gentoo-dev] RFC: esethome

2012-06-15 Thread Peter Stuge
Mike Frysinger wrote: > > + # lets see if the username already exists > > + if [[ ! -n $(egetent passwd "${euser}") ]] ; then > > "! -n" -> "-z" Does the $() argument ever need to be double quoted, or do all versions of bash actually have the string argument optional even though that'

Re: [gentoo-dev] RFC: esethome

2012-06-15 Thread Ian Stakenvicius
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 13/06/12 04:51 PM, Mike Frysinger wrote: > On Wednesday 13 June 2012 15:35:40 Ian Stakenvicius wrote: >> --- user.eclass [some timestamp] +++ >> user.eclass.esethome [some other timestamp] @@ -388,3 +388,63 >> @@ } >> >> fi + +# @FUNCT

Re: [gentoo-dev] RFC: esethome

2012-06-13 Thread Mike Frysinger
On Wednesday 13 June 2012 15:35:40 Ian Stakenvicius wrote: > --- user.eclass [some timestamp] > +++ user.eclass.esethome [some other timestamp] > @@ -388,3 +388,63 @@ > } > > fi > + > +# @FUNCTION: esethome has to be inside the giant if block. so put this above the "fi". > +# @USAG

Re: [gentoo-dev] RFC: esethome

2012-06-13 Thread Ian Stakenvicius
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 13/06/12 03:14 PM, Mike Frysinger wrote: > > eset{home,shell} don't exist today, so you should implement them > :) -mike RFC - heavily based on enewuser. - --- user.eclass [some timestamp] +++ user.eclass.esethome [some other timesta