view os2/svnrev.cmd @ 1166:568b37e4b167

Attempt at importing the svn revision with VAC/nmake. The REXX script might need some more work.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 16 Sep 2011 21:00:31 +0000
parents
children 5ff264b41985
line wrap: on
line source

/* REXX script to get the svn revision and save it to SVN.REV. */
"svnversion -n . | rxqueue"
/* Using PARSE PULL preserves case */
Parse Pull sval
/* If it is a double value get the first value */
Parse Var sval ver ':' newver 'M' 'S'
/* Remove trailing M or S from the version */
Parse Var ver tmpver 'M'
Parse Var tmpver ver 'S'
err = LINEOUT('SVN.REV', 'VERREV=' || ver, 1)
/* Check for an error. */
IF err \== 0 THEN DO
Bad:
   SAY "ERROR:" STREAM('SVN.REV', 'D')
   RETURN
END