home *** CD-ROM | disk | FTP | other *** search
-
- /*
- ** $VER: UpdateVersion.edge 1.2 (Sunday 08-Aug-93 02:54:44)
- **
- ** Find and update the version string with new date and revision.
- **
- ** Written by Thomas liljetoft
- */
-
- options results
-
- /* get date and filename */
-
- 'getenvvar' _ge_date
- timestamp = result
- 'getenvvar' _fe_name
- filename = result
-
- /* save old flags */
- 'getenvvar' _fe_flags
- oldflags = result
-
- /* find the version string, e.g '$VER: <filename>' */
-
- 'position' sof
- 'find' '"'"$VER: "filename'"' 0 1 0 0 0
- if RC ~= 0 then
- do
-
- /* no version string found, say so and exit */
-
- 'beepscreen'
- 'requestnotify' '"No version string found"'
- 'putenvvar' _fe_flags oldflags
- exit(10)
- end
-
- /* find the beginning of the date, and get the revision number */
-
- 'find' '"("'
- 'cursor' left 1
- 'copy' rb back word
- revision = result
-
- /* delete the old revision number and date */
-
- 'markblock'
- 'find' '")"'
- 'cursor right 1'
- 'erase'
-
- /* insert the new revision number (old revision + 1) and the new date */
-
- 'text' '"'revision + 1" ("timestamp")"'"' raw
- 'putenvvar' _fe_flags oldflags
-
- exit(0)
-