[GRASS-SVN] r40090 - grass/trunk/general/g.version
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Dec 20 09:08:12 EST 2009
Author: martinl
Date: 2009-12-20 09:08:11 -0500 (Sun, 20 Dec 2009)
New Revision: 40090
Modified:
grass/trunk/general/g.version/main.c
Log:
g.version: print svn revision in verbose mode
Modified: grass/trunk/general/g.version/main.c
===================================================================
--- grass/trunk/general/g.version/main.c 2009-12-20 13:46:32 UTC (rev 40089)
+++ grass/trunk/general/g.version/main.c 2009-12-20 14:08:11 UTC (rev 40090)
@@ -59,11 +59,15 @@
if (G_parser(argc, argv))
exit(EXIT_FAILURE);
- if (strlen(GRASS_VERSION_SVN) > 0) {
- fprintf(stdout, "GRASS %s (%s) - r%s\n",
- GRASS_VERSION_NUMBER, GRASS_VERSION_DATE,
- GRASS_VERSION_SVN);
+ if (G_verbose() > G_verbose_std() && strlen(GRASS_VERSION_SVN) > 0) {
+ fprintf(stdout, "GRASS %s.%s (%s)\n",
+ GRASS_VERSION_NUMBER, GRASS_VERSION_SVN,
+ GRASS_VERSION_DATE);
}
+ else if (G_verbose() < G_verbose_std()) {
+ fprintf(stdout, "GRASS %s\n",
+ GRASS_VERSION_NUMBER);
+ }
else {
fprintf(stdout, "GRASS %s (%s) %s\n",
GRASS_VERSION_NUMBER, GRASS_VERSION_DATE,
More information about the grass-commit
mailing list