1 |
Dnia 2014-09-03, o godz. 23:48:50 |
2 |
Brian Dolbec <dolsen@g.o> napisał(a): |
3 |
|
4 |
> On Thu, 4 Sep 2014 08:38:29 +0200 |
5 |
> Michał Górny <mgorny@g.o> wrote: |
6 |
> |
7 |
> > Dnia 2014-09-03, o godz. 18:22:15 |
8 |
> > Brian Dolbec <dolsen@g.o> napisał(a): |
9 |
> > |
10 |
> |
11 |
> > > fixed: bracket spacing (spotted by mrueg) |
12 |
> > > |
13 |
> > > diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync |
14 |
> > > index 2f0689c..43f92b6 100755 |
15 |
> > > --- a/bin/emerge-webrsync |
16 |
> > > +++ b/bin/emerge-webrsync |
17 |
> > > @@ -501,8 +501,8 @@ main() { |
18 |
> > > |
19 |
> > > # This is a sanity check to help prevent people like funtoo |
20 |
> > > users # from accidentally wiping out their git tree. |
21 |
> > > - if [[ -n ${repo_sync_type} && ${repo_sync_type} != rsync |
22 |
> > > ]] ;then |
23 |
> > > - echo "The current sync-type attribute of |
24 |
> > > repository 'gentoo' is not set to 'rsync':" >&2 |
25 |
> > > + if [ [ -n ${repo_sync_type} ] && [ ${repo_sync_type} != |
26 |
> > > rsync -o ${repo_sync_type} != websync ] ] ; then |
27 |
> > > + echo "The current sync-type attribute of |
28 |
> > > repository 'gentoo' is not set to 'rsync' or 'websync':" >&2 echo |
29 |
> > > >&2 |
30 |
> > |
31 |
> > I don't know what magic this is but you definitely want the old |
32 |
> > |
33 |
> > [[ -n ${repo_sync_type} && ${repo_sync_type} != rsync ]] |
34 |
> > |
35 |
> > with no extra brackets. |
36 |
> > |
37 |
> |
38 |
> Looks like some line wrap might be confusing it. There was an added |
39 |
> test (condition 2b)in the second half, so needed an extra set of brackets. |
40 |
> |
41 |
> if your client wraps this, read it as one line please. |
42 |
> |
43 |
> if [[ -n ${repo_sync_type} ] && [ ${repo_sync_type} != rsync -o ${repo_sync_type} != websync ]] ; then |
44 |
> |
45 |
> condition 1 ^^^ condition 2a ^^^ condition 2b ^^^ |
46 |
> |
47 |
> if it still isn't correct, please reply with it corrected... |
48 |
> much appreciated :) |
49 |
|
50 |
[[ -n ${repo_sync_type} && ( ${repo_sync_type} != rsync || ${repo_sync_type} != websync ) ]] |
51 |
|
52 |
? |
53 |
|
54 |
|
55 |
-- |
56 |
Best regards, |
57 |
Michał Górny |