trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: January 2012

Re: [trinity-devel] test: =: unary operator expected

From: Darrell Anderson <humanreadable@...>
Date: Fri, 20 Jan 2012 12:48:23 -0800 (PST)
> I am receiving that error in all of
> my automake builds. The cause is the usual comparing a
> result to a non integer:
> 
> if test "$kde_qtver" = "3"; then
>   if test "$kde_qtsubver" -le 1; then
>     trinity2ornewer=
>   fi
>   if test "$kde_qtsubver" -le 2; then
>     trinity3ornewer=
>   fi
>   if test "$KDECONFIG" != "compiled"; then
>     if test `$KDECONFIG --version | grep KDE |
> sed 's/KDE: \(...\).*/\1/'` = 3.2; then
>       trinity3ornewer=
>     fi
>   fi
> fi
> 
> Is this test looking to test against 3 or 2? I think 2
> because 3 is already established in the first test of this
> snippet.
> 
> Anyway, this needs a fixin'.
> 
> Up to you Tim!

Oh, by the way, the following needs a fixing' too:

AS IS:
grep KDE | sed 's/KDE

CHANGE TO:
grep TDE | sed 's/TDE

Further, using kde-config in GIT will return the following:

kde-config --version | grep TDE
TDE: R14.0.0 [DEVELOPMENT]

The current parsing method won't work.

:)

Darrell