[Gambas-user] getting Gambas version info across devices

Bruce Steers bsteers4 at gmail.com
Fri Mar 26 11:54:29 CET 2021


On Thu, 25 Mar 2021 at 20:38, Bruce <adamnt42 at gmail.com> wrote:

> On 26/3/21 3:07 am, Bruce Steers wrote:
> > ELF could work i think as i have readelf command.
> >
> > but a bit of a needle in a haystack. Not sure where to look for the
> > version/trunk info.
> >
> >
> > Best i have come up with is this terrible awful , almost disgraceful hack
> > using the command strings.
> > "terrible but it works" ;)
> >
> >      Dim sCli, sVer As String
> >
> >          Shell "strings " & sDrive &/ "usr/bin/gbc3 | grep '3.'" Wait To
> sCli
> >          Dim sVar As String[] = Split(sCli, "\n")
> >          Dim c As Integer = sVar.Find("gbc3: start task: [%d] '%s'")
> >          While Left(sVer, 2) <> "3." And c < sVar2.Count
> >          Inc c
> >          sVer = sVar2[c]
> >          Wend
> >
> > Hack , some might say.
> > Luck , could also be true.
> >
> > whatever you cal it i'm now 10 out of 10 on getting it right ,,,, wrongly
> > ;) lol
> >
> >
> > But the ELF way looks to be the way if only you know what to look for
> (and
> > i don't :( )
> >
> > BruceS
> >
>
> Urrgh, Yes, Sort of "If it looks a bit like a duck then it must be a
> duck, so shoot it." :-)
>
> maybe
> Shell "strings " & sDrive &/ "usr/bin/gbc3 | grep '3\.[0-9]'" Wait To sCli
> might lower the risk.
>
> b
>

yes that is better
cheers bruce,

BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210326/850733e5/attachment.htm>


More information about the User mailing list