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