oops
[oweals/openssl.git] / install.com
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 $!
8 $       DEF_ORIG = F$ENVIRONMENT( "DEFAULT")
9 $       ON ERROR THEN GOTO TIDY
10 $       ON CONTROL_C THEN GOTO TIDY
11 $
12 $       IF P1 .EQS. ""
13 $       THEN
14 $           WRITE SYS$OUTPUT "First argument missing."
15 $           WRITE SYS$OUTPUT -
16                   "It Should be the directory where you want things installed."
17 $           EXIT
18 $       ENDIF
19 $
20 $       IF (F$GETSYI("CPU").LT.128)
21 $       THEN
22 $           ARCH := VAX
23 $       ELSE
24 $           ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
25 $           IF (ARCH .EQS. "") THEN ARCH = "UNK"
26 $       ENDIF
27 $
28 $       ROOT = F$PARSE(P1,"[]A.;0",,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0"
29 $       ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY")
30 $       ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
31                    - ".][000000" - "[000000." - "][" - "[" - "]"
32 $       ROOT = ROOT_DEV + "[" + ROOT_DIR
33 $
34 $       DEFINE/NOLOG WRK_SSLROOT 'ROOT'.] /TRANS=CONC
35 $       DEFINE/NOLOG WRK_SSLXLIB WRK_SSLROOT:['ARCH'_LIB]
36 $       DEFINE/NOLOG WRK_SSLLIB WRK_SSLROOT:[LIB]
37 $       DEFINE/NOLOG WRK_SSLINCLUDE WRK_SSLROOT:[INCLUDE]
38 $       DEFINE/NOLOG WRK_SSLXEXE WRK_SSLROOT:['ARCH'_EXE]
39 $       DEFINE/NOLOG WRK_SSLCERTS WRK_SSLROOT:[CERTS]
40 $       DEFINE/NOLOG WRK_SSLPRIVATE WRK_SSLROOT:[PRIVATE]
41 $
42 $!
43 $! Exhibit the destination directory.
44 $!
45 $       WRITE SYS$OUTPUT "   Installing to (WRK_SSLROOT) ="
46 $       WRITE SYS$OUTPUT "    ''f$trnlnm( "WRK_SSLROOT")'"
47 $       WRITE SYS$OUTPUT ""
48 $
49 $       IF F$PARSE("WRK_SSLROOT:[000000]") .EQS. "" THEN -
50            CREATE/DIR/LOG WRK_SSLROOT:[000000]
51 $       IF F$PARSE("WRK_SSLXEXE:") .EQS. "" THEN -
52            CREATE/DIR/LOG WRK_SSLXEXE:
53 $       IF F$PARSE("WRK_SSLXLIB:") .EQS. "" THEN -
54            CREATE/DIR/LOG WRK_SSLXLIB:
55 $       IF F$PARSE("WRK_SSLLIB:") .EQS. "" THEN -
56            CREATE/DIR/LOG WRK_SSLLIB:
57 $       IF F$PARSE("WRK_SSLINCLUDE:") .EQS. "" THEN -
58            CREATE/DIR/LOG WRK_SSLINCLUDE:
59 $       IF F$PARSE("WRK_SSLCERTS:") .EQS. "" THEN -
60            CREATE/DIR/LOG WRK_SSLCERTS:
61 $       IF F$PARSE("WRK_SSLPRIVATE:") .EQS. "" THEN -
62            CREATE/DIR/LOG WRK_SSLPRIVATE:
63 $       IF F$PARSE("WRK_SSLROOT:[VMS]") .EQS. "" THEN -
64            CREATE/DIR/LOG WRK_SSLROOT:[VMS]
65 $
66 $       SDIRS := CRYPTO,SSL,APPS,VMS!,RSAREF,TEST,TOOLS
67 $       EXHEADER := e_os2.h
68 $
69 $       COPY 'EXHEADER' WRK_SSLINCLUDE: /LOG
70 $       SET FILE/PROT=WORLD:RE WRK_SSLINCLUDE:'EXHEADER'
71 $
72 $       I = 0
73 $ LOOP_SDIRS: 
74 $       D = F$ELEMENT(I, ",", SDIRS)
75 $       I = I + 1
76 $       IF D .EQS. "," THEN GOTO LOOP_SDIRS_END
77 $       WRITE SYS$OUTPUT "Installing ",D," files."
78 $       SET DEFAULT [.'D']
79 $       @INSTALL 'ROOT']
80 $       SET DEFAULT [-]
81 $       GOTO LOOP_SDIRS
82 $ LOOP_SDIRS_END:
83 $
84 $       WRITE SYS$OUTPUT ""
85 $       WRITE SYS$OUTPUT "      Installation done!"
86 $       WRITE SYS$OUTPUT ""
87 $       WRITE SYS$OUTPUT "      You might want to purge ",ROOT,"...]"
88 $       WRITE SYS$OUTPUT ""
89 $
90 $ TIDY:
91 $       SET DEFAULT 'DEF_ORIG'
92 $
93 $       DEASSIGN WRK_SSLROOT
94 $       DEASSIGN WRK_SSLXLIB
95 $       DEASSIGN WRK_SSLLIB
96 $       DEASSIGN WRK_SSLINCLUDE
97 $       DEASSIGN WRK_SSLXEXE
98 $       DEASSIGN WRK_SSLCERTS
99 $       DEASSIGN WRK_SSLPRIVATE
100 $
101 $       EXIT