Dnia 2014-09-03, o godz. 23:48:50
Brian Dolbec <dol...@gentoo.org> napisał(a):

> On Thu, 4 Sep 2014 08:38:29 +0200
> Michał Górny <mgo...@gentoo.org> wrote:
> 
> > Dnia 2014-09-03, o godz. 18:22:15
> > Brian Dolbec <dol...@gentoo.org> napisał(a):
> > 
> 
> > > fixed:  bracket spacing  (spotted by mrueg)
> > > 
> > > diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
> > > index 2f0689c..43f92b6 100755
> > > --- a/bin/emerge-webrsync
> > > +++ b/bin/emerge-webrsync
> > > @@ -501,8 +501,8 @@ main() {
> > >  
> > >   # This is a sanity check to help prevent people like funtoo
> > > users # from accidentally wiping out their git tree.
> > > - if [[ -n ${repo_sync_type} && ${repo_sync_type} != rsync
> > > ]] ;then
> > > -         echo "The current sync-type attribute of
> > > repository 'gentoo' is not set to 'rsync':" >&2
> > > + if [ [ -n ${repo_sync_type} ] && [ ${repo_sync_type} !=
> > > rsync -o ${repo_sync_type} != websync ] ] ; then
> > > +         echo "The current sync-type attribute of
> > > repository 'gentoo' is not set to 'rsync' or 'websync':" >&2 echo
> > > >&2
> > 
> > I don't know what magic this is but you definitely want the old
> > 
> >   [[ -n ${repo_sync_type} && ${repo_sync_type} != rsync ]]
> > 
> > with no extra brackets.
> > 
> 
> Looks like some line wrap might be confusing it.  There was an added
> test (condition 2b)in the second half, so needed an extra set of brackets.
> 
> if your client wraps this, read it as one line please.
> 
> if [[ -n ${repo_sync_type} ] && [ ${repo_sync_type} != rsync -o 
> ${repo_sync_type} != websync ]] ; then
> 
> condition 1   ^^^                 condition 2a ^^^                   
> condition 2b ^^^ 
> 
> if it still isn't correct, please reply with it corrected...
> much appreciated :)

[[ -n ${repo_sync_type} && ( ${repo_sync_type} != rsync || ${repo_sync_type} != 
websync ) ]]

?


-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: PGP signature

Reply via email to