Am 23.08.2011 um 23:10 schrieb Jean-Marc Lasgouttes:

> Le 19/07/11 14:43, Stephan Witt a écrit :
>> In case of interest
>> 
>> QT_VERSION="4.10.3" sh -c 'v="0x0"; for i in ${QT_VERSION//./ } ; do case $i 
>> in 10) v=$v"0a" ;; 11) v=$v"0b" ;; 12) v=$v"0c" ;; 13) v=$v"0d" ;; 14) 
>> v=$v"0e" ;; 15) v=$v"0f" ;; *) v=$v"0"$i ;; esac ; done; echo $v'
>> 
>> prints 0x0040a03
> 
> Why not put it in?

The current solution (using bc) is ok - after the dependency is added.
I felt no need to fix it since it's not broken.

> Another solution is to use the "printf" command.

Good idea.

> Is it portable?

It's present and produces identical output on Solaris 2.5, SuSE-Linux and Mac 
OS X.
I cannot say if it is present on the build service systems out of the box.

Stephan

Reply via email to