home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / larcos.zip / EXAMPLES.ZIP / LARCARC.BAT < prev    next >
DOS Batch File  |  1994-05-15  |  10KB  |  237 lines

  1. @ECHO OFF
  2. REM ============================================================================
  3. REM 
  4. REM LARC-S "LARC Examples"
  5. REM LARC-D "Full System Build Archive Batch File"
  6. REM LARC-V "100"
  7. REM
  8. REM Revision history:
  9. REM kbg 05/14/94 100 - Created.
  10. REM
  11. REM Some general notes about this file follows.
  12. REM
  13. REM This batch file is executed whenever a full system release build is
  14. REM performed.  The batch file is responsible for creating a complete archive
  15. REM of everything that was used to build the release.
  16. REM
  17. REM
  18. REM This batch file is started by LARC and LARC passes the following parameters:
  19. REM 
  20. REM     %1 = Argument 1 contains the 8 character release identifier that you
  21. REM         entered when you started building the release.
  22. REM
  23. REM     %2 = Argument 2 contains the release build type that you selected:
  24. REM
  25. REM        "*" = full system build requested.
  26. REM        "T" = test build requested.
  27. REM        "1" thru "5" = individual test build requested.
  28. REM
  29. REM     %3 = Argument 3 contains the two character hard drive name (i.e., "C:").
  30. REM
  31. REM     %4 = Argument 4 contains source file directory name (i.e., "C:\LARCEMP").
  32. REM
  33. REM     %5 = Argument 5 contains the constant "FULL-RELEASE".
  34. REM
  35. REM     %6 = Argument 6 contains current system date formatted as mm-dd-yy.
  36. REM
  37. REM     %7 = Argument 7 contains current system time formatted as hh:mm:ss.
  38. REM
  39. REM     %8 = Argument 8 contains the three character source library number.
  40. REM         This number can be used to archive the LARC control files
  41. REM         (MODCTL.nnn, RELCTL.nnn, REVCTL.nnn) that belong with the
  42. REM         library being archived.  However, if you use many libraries to
  43. REM         build you release, then it is suggested that you archive all of
  44. REM         LARC control files.
  45. REM
  46. REM     %9 = Argument 9 contains the same release identifier that is passed in
  47. REM         argument 1, but this one has certain characters (such as "V",
  48. REM         and "." removed.  This argument provides the release identifier in
  49. REM          a format that can be used to create file names.
  50. REM
  51. REM LARC allows you complete freedom over how your product is archived.  Since
  52. REM LARC executes this standard DOS command batch file, you can use any
  53. REM combination of system commands to archive the release.
  54. REM
  55. REM Normally, ECHO OFF is set to keep things like REM lines from being
  56. REM scrolled up the screen.  Then ECHO commands are used to display progress
  57. REM messages.  
  58. REM
  59. REM ============================================================================
  60.  
  61.  
  62.  
  63.  
  64. REM ============================================================================
  65. REM Display some initial information on the screen.
  66. REM ============================================================================
  67. ECHO.
  68. ECHO Full System Archive of build %1.
  69. ECHO.
  70. ECHO Delete all files from the temporary work directory C:\LARC3\TEMP...
  71.  
  72.  
  73.  
  74.  
  75. REM ============================================================================
  76. REM Use Ken's File Deletion utility with the "/N" option to delete any existing
  77. REM files with being prompted before the delete.  Notice that this entire
  78. REM process will use the C:\LARC3\TEMP directory.  You can use any directory
  79. REM name.  However, if you were to archive directly to an off-line media, such
  80. REM as tape, then you might need to replace this delete command with appropriate
  81. REM tape formatting or initialization commands.
  82. REM ============================================================================
  83. KDEL/N C:\LARC3\TEMP\*.*
  84.  
  85.  
  86.  
  87.  
  88. REM ============================================================================
  89. REM Now a file will be created and printed that describes the contents of the
  90. REM archive set.  This file should be stored with the archive set to help you
  91. REM identify the contents at a future date.
  92. REM ============================================================================
  93. ECHO.
  94. ECHO Creating READ.ME file containing notes of the archive files...
  95.  
  96. ECHO.                                    > C:\LARC3\TEMP\READ.ME
  97. ECHO         Archive Diskettes for LARC Hello %1            >> C:\LARC3\TEMP\READ.ME
  98. ECHO         Created %6 at %7                     >> C:\LARC3\TEMP\READ.ME
  99. ECHO.                                    >> C:\LARC3\TEMP\READ.ME
  100. ECHO         This archive contains:                    >> C:\LARC3\TEMP\READ.ME
  101. ECHO.                                    >> C:\LARC3\TEMP\READ.ME
  102. ECHO             READ.ME        This file            >> C:\LARC3\TEMP\READ.ME
  103. ECHO             FILES.LST    List of source files        >> C:\LARC3\TEMP\READ.ME
  104. ECHO             SOURCES.ZIP    Source files            >> C:\LARC3\TEMP\READ.ME
  105. ECHO             RELEASE.ZIP    Release directory files        >> C:\LARC3\TEMP\READ.ME
  106. ECHO             LARC.ZIP    Full LARC system files        >> C:\LARC3\TEMP\READ.ME
  107. ECHO.                                    >> C:\LARC3\TEMP\READ.ME
  108.  
  109. PRINT C:\LARC3\TEMP\READ.ME
  110.  
  111.  
  112.  
  113.  
  114. REM ============================================================================
  115. REM Create a ZIP file containing all of the source files.
  116. REM ============================================================================
  117. ECHO.
  118. ECHO Zip the LARC sources...
  119. PKZIP C:\LARC3\TEMP\SOURCES.ZIP C:\LARCSRC\EXAMPLES\*.*
  120.  
  121.  
  122.  
  123.  
  124. REM ============================================================================
  125. REM Copy the LARC control files for your library into the temporary
  126. REM directory as a safeguard.  This will get the control files stored
  127. REM it the exact state as when the archive was created.
  128. REM ============================================================================
  129. ECHO.
  130. ECHO Copy the LARC control files...
  131. COPY C:\LARC3\*.%8 C:\LARC3\TEMP\*.* >NUL
  132.  
  133.  
  134.  
  135.  
  136. REM ============================================================================
  137. REM Create an "on-site" backup that contains a copy of just the source files.
  138. REM This on-site backup can be used to gain quick access to this library's files
  139. REM should that ever be necessary.  We use Ken's File Copy utility to copy the
  140. REM files from the temporary directory to diskette A:.  You would, of course,
  141. REM replace this command with the commands necessary to copy the files to your
  142. REM backup media.
  143. REM ============================================================================
  144. ECHO.
  145. ECHO Start copying the zipped source files to the archive diskettes
  146. ECHO in drive A:.  Make sure that each diskette is labeled:
  147. ECHO.
  148. ECHO         LARC Hello Example
  149. ECHO         On-site Source Diskettes for Release %1
  150. ECHO         Created %6
  151. ECHO         Diskette 1 of n
  152. ECHO.
  153. KCOPY C:\LARC3\TEMP\*.* A:
  154.  
  155.  
  156.  
  157.  
  158. REM ============================================================================
  159. REM Now that the on-site backup has been made, we are going to add some
  160. REM additional things to the temporary directory.  We already have the source
  161. REM files, so we will add the release and LARC system directory.
  162. REM
  163. REM If you create separate configurations of LARC, it is recommended that you
  164. REM make sure you archive the specific configuration directory.  While all of
  165. REM the LARC configuration files are important, backing up the system activity
  166. REM log file (SYSLOG.LRC) will ensure that you have a snapshot of all LARC
  167. REM activity through the release creation stage.
  168. REM ============================================================================
  169. ECHO.
  170. ECHO Zip the release directory...
  171. PKZIP C:\LARC3\TEMP\RELEASE.ZIP C:\LARCSRC\EXMPREL\*.*
  172.  
  173. ECHO.
  174. ECHO Zip the release directory...
  175. PKZIP C:\LARC3\TEMP\LARC.ZIP C:\LARC3\*.*
  176.  
  177.  
  178.  
  179.  
  180. REM ============================================================================
  181. REM You can use the LDIR utility program to generate a file containing a
  182. REM description of all of the source files that you are archiving.
  183. REM ============================================================================
  184. ECHO.
  185. ECHO Creating the library listing file FILES.LST...
  186. LDIR/C C:\LARC3\LARC.CFG %8 C:\LARC3\TEMP\FILES.LST
  187.  
  188.  
  189.  
  190. REM ============================================================================
  191. REM Create an "off-site" archive.  This archive media should contain EVERYTHING
  192. REM used to create your product.  While this example does not demonstrate
  193. REM backing up development tools, you should consider doing so for legacy system
  194. REM support issues.  Of course, you will need to ensure that the license
  195. REM agreements for each individual development tool permits such backups.
  196. REM
  197. REM We also highly recommend that you make arrangements for the off-site
  198. REM archive to be vaulted in a fire-safe location, preferable at a location
  199. REM away from you main business location.
  200. REM
  201. REM As with the on-site backup, we are using Ken's File Copy utility to copy the
  202. REM files from the temporary directory to diskette A:.  You would, of course,
  203. REM replace this command with the commands necessary to copy the files to your
  204. REM backup media.
  205. REM ============================================================================
  206. ECHO.
  207. ECHO Start copying the zipped files to the archive diskettes in
  208. ECHO drive A:.  Make sure that each diskette is labeled:
  209. ECHO.
  210. ECHO         LARC Hello Example
  211. ECHO         Archive Diskettes for Release %1
  212. ECHO         Created %6
  213. ECHO         Diskette 1 of n
  214. ECHO.
  215.  
  216. KCOPY C:\LARC3\TEMP\*.* A:
  217.  
  218.  
  219.  
  220.  
  221. REM ============================================================================
  222. REM Remove the last diskette an make sure that all diskettes have been
  223. REM properly labeled.
  224. REM ============================================================================
  225. ECHO.
  226. ECHO Remove the last diskette from drive A: and make sure that
  227. ECHO each diskette is properly labelled and write protected!
  228.  
  229.  
  230.  
  231.  
  232. REM ============================================================================
  233. REM Finally, we delete the files from the temporary directory.  This step
  234. REM may be unnecessary if you archive directly to your archive media.
  235. REM ============================================================================
  236. KDEL/N C:\LARC3\TEMP\*.*
  237.