Mercurial > dwindows
annotate 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 |
rev | line source |
---|---|
1166
568b37e4b167
Attempt at importing the svn revision with VAC/nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
1 /* REXX script to get the svn revision and save it to SVN.REV. */ |
568b37e4b167
Attempt at importing the svn revision with VAC/nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
2 "svnversion -n . | rxqueue" |
568b37e4b167
Attempt at importing the svn revision with VAC/nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
3 /* Using PARSE PULL preserves case */ |
568b37e4b167
Attempt at importing the svn revision with VAC/nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
4 Parse Pull sval |
568b37e4b167
Attempt at importing the svn revision with VAC/nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
5 /* If it is a double value get the first value */ |
568b37e4b167
Attempt at importing the svn revision with VAC/nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
6 Parse Var sval ver ':' newver 'M' 'S' |
568b37e4b167
Attempt at importing the svn revision with VAC/nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
7 /* Remove trailing M or S from the version */ |
568b37e4b167
Attempt at importing the svn revision with VAC/nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
8 Parse Var ver tmpver 'M' |
568b37e4b167
Attempt at importing the svn revision with VAC/nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
9 Parse Var tmpver ver 'S' |
568b37e4b167
Attempt at importing the svn revision with VAC/nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
10 err = LINEOUT('SVN.REV', 'VERREV=' || ver, 1) |
568b37e4b167
Attempt at importing the svn revision with VAC/nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
11 /* Check for an error. */ |
568b37e4b167
Attempt at importing the svn revision with VAC/nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
12 IF err \== 0 THEN DO |
568b37e4b167
Attempt at importing the svn revision with VAC/nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
13 Bad: |
568b37e4b167
Attempt at importing the svn revision with VAC/nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
14 SAY "ERROR:" STREAM('SVN.REV', 'D') |
568b37e4b167
Attempt at importing the svn revision with VAC/nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
15 RETURN |
568b37e4b167
Attempt at importing the svn revision with VAC/nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
16 END |