2
0

install.com 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. $! INSTALL.COM -- Installs the files in a given directory tree
  2. $!
  3. $! Author: Richard Levitte <richard@levitte.org>
  4. $! Time of creation: 22-MAY-1998 10:13
  5. $!
  6. $! P1 root of the directory tree
  7. $! P2 "64" for 64-bit pointers.
  8. $!
  9. $!
  10. $! Announce/identify.
  11. $!
  12. $ proc = f$environment( "procedure")
  13. $ write sys$output "@@@ "+ -
  14. f$parse( proc, , , "name")+ f$parse( proc, , , "type")
  15. $!
  16. $ def_orig = f$environment( "default")
  17. $ on error then goto tidy
  18. $ on control_c then goto tidy
  19. $!
  20. $ if (p1 .eqs. "")
  21. $ then
  22. $ write sys$output "First argument missing."
  23. $ write sys$output -
  24. "It should be the directory where you want things installed."
  25. $ exit
  26. $ endif
  27. $!
  28. $ if (f$getsyi("cpu") .lt. 128)
  29. $ then
  30. $ arch = "VAX"
  31. $ else
  32. $ arch = f$edit( f$getsyi( "arch_name"), "upcase")
  33. $ if (arch .eqs. "") then arch = "UNK"
  34. $ endif
  35. $!
  36. $ archd = arch
  37. $!
  38. $ if (p2 .nes. "")
  39. $ then
  40. $ if (p2 .eqs. "64")
  41. $ then
  42. $ archd = arch+ "_64"
  43. $ else
  44. $ if (p2 .nes. "32")
  45. $ then
  46. $ write sys$output "Second argument invalid."
  47. $ write sys$output "It should be "32", "64", or nothing."
  48. $ exit
  49. $ endif
  50. $ endif
  51. $ endif
  52. $!
  53. $ root = f$parse( p1, "[]A.;0", , , "syntax_only, no_conceal") - "A.;0"
  54. $ root_dev = f$parse( root, , , "device", "syntax_only")
  55. $ root_dir = f$parse( root, , , "directory", "syntax_only") -
  56. - ".][000000" - "[000000." - "][" - "[" - "]"
  57. $ root = root_dev + "[" + root_dir
  58. $!
  59. $ define /nolog wrk_sslroot 'root'.] /trans=conc
  60. $ define /nolog wrk_sslcerts wrk_sslroot:[certs]
  61. $ define /nolog wrk_sslinclude wrk_sslroot:[include]
  62. $ define /nolog wrk_ssllib wrk_sslroot:[lib]
  63. $ define /nolog wrk_sslprivate wrk_sslroot:[private]
  64. $ define /nolog wrk_sslxexe wrk_sslroot:['archd'_exe]
  65. $ define /nolog wrk_sslxlib wrk_sslroot:['arch'_lib]
  66. $!
  67. $! Exhibit the destination directory.
  68. $!
  69. $ write sys$output " Installing to (WRK_SSLROOT) ="
  70. $ write sys$output " ''f$trnlnm( "wrk_sslroot")'"
  71. $ write sys$output ""
  72. $!
  73. $ if f$parse("wrk_sslroot:[000000]") .eqs. "" then -
  74. create /directory /log wrk_sslroot:[000000]
  75. $ if f$parse("wrk_sslxexe:") .eqs. "" then -
  76. create /directory /log wrk_sslxexe:
  77. $ if f$parse("wrk_sslxlib:") .eqs. "" then -
  78. create /directory /log wrk_sslxlib:
  79. $ if f$parse("wrk_ssllib:") .eqs. "" then -
  80. create /directory /log wrk_ssllib:
  81. $ if f$parse("wrk_sslinclude:") .eqs. "" then -
  82. create /directory /log wrk_sslinclude:
  83. $ if f$parse("wrk_sslcerts:") .eqs. "" then -
  84. create /directory /log wrk_sslcerts:
  85. $ if f$parse("wrk_sslprivate:") .eqs. "" then -
  86. create /directory /log wrk_sslprivate:
  87. $ if f$parse("wrk_sslroot:[VMS]") .EQS. "" THEN -
  88. create /directory /log wrk_sslroot:[VMS]
  89. $!
  90. $ sdirs := CRYPTO, SSL, APPS, VMS !!!, RSAREF, TEST, TOOLS
  91. $ exheader := e_os2.h
  92. $!
  93. $ copy /protection = w:re 'exheader' wrk_sslinclude: /log
  94. $!
  95. $ i = 0
  96. $ loop_sdirs:
  97. $ d = f$edit( f$element(i, ",", sdirs), "trim")
  98. $ i = i + 1
  99. $ if d .eqs. "," then goto loop_sdirs_end
  100. $ write sys$output "Installing ", d, " files."
  101. $ set default [.'d']
  102. $ @ install-'d'.com 'root'] 'p2'
  103. $ set default 'def_orig'
  104. $ goto loop_sdirs
  105. $ loop_sdirs_end:
  106. $!
  107. $ write sys$output ""
  108. $ write sys$output " Installation done!"
  109. $ write sys$output ""
  110. $ if (f$search( root+ "...]*.*;-1") .nes. "")
  111. $ then
  112. $ write sys$output " You might want to purge ", root, "...]"
  113. $ write sys$output ""
  114. $ endif
  115. $!
  116. $ tidy:
  117. $!
  118. $ set default 'def_orig'
  119. $!
  120. $ call deass wrk_sslroot
  121. $ call deass wrk_sslcerts
  122. $ call deass wrk_sslinclude
  123. $ call deass wrk_ssllib
  124. $ call deass wrk_sslprivate
  125. $ call deass wrk_sslxexe
  126. $ call deass wrk_sslxlib
  127. $!
  128. $ exit
  129. $!
  130. $ deass: subroutine
  131. $ if (f$trnlnm( p1, "LNM$PROCESS") .nes. "")
  132. $ then
  133. $ deassign /process 'p1'
  134. $ endif
  135. $ endsubroutine
  136. $!