[GRASS-dev] Getting version number *before* starting

Rainer M Krug Rainer at krugs.de
Fri Jan 30 01:26:09 PST 2015


Vaclav Petras <wenzeslaus at gmail.com> writes:

> On Thu, Jan 29, 2015 at 9:51 AM, Rainer M Krug <Rainer at krugs.de> wrote:
>
>> Hi
>>
>> I would, for implementation in spgrass7 in R, to be able to get the version
>> number of GRASS GIS before starting GRASS.
>
>
> I know about the --version parameter of grass command.

This is for "human consumption" and, as you point out below, has changed
quite a bit - actually I think that the version info is just plainly
missing from GRASS GIS 7.0.0RC1 as I think it should be before the
license?



>
> {{{
> $ grass64 --version
>
> GRASS GIS 6.4.4
>
> Geographic Resources Analysis Support System (GRASS) is Copyright,
> 1999-2014 by the GRASS Development Team, and licensed under terms of the
> GNU General Public License (GPL) version >=2.
>
> This GRASS 6.4.4 release is coordinated and produced by the...
> }}}
>
> Unfortunately for GRASS GIS 7 it is giving more the license and about then
> the version:
>
> {{{
> $ grass71 --version
>
> Geographic Resources Analysis Support System (GRASS) is Copyright,
> 1999-2014 by the GRASS Development Team, and licensed under terms of the
> GNU General Public License (GPL) version >=2.
>
> This GRASS 7.1.svn release is coordinated and produced by
> }}}
>
> Although, I'm running 71 from source code, so it might be different.
>
> To get general idea, here are examples what other projects have in
> --version:
>
> {{{
> gcc --version
> gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
> Copyright (C) 2013 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> ...
> }}}
>
> {{{
> pandoc --version
> pandoc 1.12.2.1
> Compiled with texmath 0.6.5.2, highlighting-kate 0.5.5.1.
> Syntax highlighting is supported for the following languages:
> ...
> }}}

Yup - they all have the version in the first line, bur RC1 has it not -
I think this is a bug?

Thanks,

Rainer

>
> I know that in the file
>>
>> ,----
>> | GRASS_BASE_DIRECTORY/etc/VERSIONNUMBER
>> `----
>>
>> the version number is stored, but I have two questions:
>>
>> 1) is this the same between systems (I saw it in Mac Linux and Windows)?
>> 2) I assume the location of this file is very un-likely to change?
>> 3) can the internal structure of the GDRASS_BASE_DIRECTORY be configured
>> during the build process (particularly the bin/ and the location of
>> VERSIONNUMBER), and if yes, how can I obtain the location of these folders?
>>
>> So: would there be any downside in just reading this file to determine
>> the version of GRASS GIS, as the grass startup script seems to be
>> reading from that file as well?
>>
>> Thanks,
>>
>> Rainer
>>
>> --
>> Rainer M. Krug
>> email: Rainer<at>krugs<dot>de
>> PGP: 0x0F52F982
>>
>> _______________________________________________
>> grass-dev mailing list
>> grass-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-dev
>>
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 494 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20150130/779b503a/attachment.pgp>


More information about the grass-dev mailing list