Debian Codegraph @

install/unix/install3

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 #! /bin/bashscip-shell filesystem . . `/bin/bash`.
2 # .COPYRIGHT: Copyright (c) 2011 European Southern Observatory,
3 # all rights reserved
4 # .TYPE command
5 # .NAME install3.sh
6 # .LANGUAGE shell script
7 # .ENVIRONMENT Unix Systems. Executable under SHELL and C-SHELL
8 # .COMMENTS Installation procedure of the MIDAS system starting from
9 # scratch.
10 # Usage: install system [options]
11 #
12 # .AUTHOR Klaus Banse
13 # .VERSION
14 # 110825 creation
15 # 190322 last modif take out continue statements,
16 # and fix for being called from config
17
18
19 #*************** building dummy NAG library *********************
20
21 # the install3 script is called from install1 with one parameter
22 # par1 = manual (to use an edited make_options file),
23 # or = -a (via autoconfig)
24 # or no parameter at all
25
26 cd $MID_HOME/system/ext
27 makescip-shell system . . make.
28 if [scip-shell system . . `[`. $? != 0 ]; then
29 echoscip-shell system . . echo. "Error building esoext."
30 exit 1
31 fi
32 #
33 cd $MID_HOME/libsrc/nag
34 rmscip-shell system . . rm. -f ../../lib/libnag.a
35
36 makescip-shell system . . make. all
37 if [scip-shell system . . `[`. $? != 0 ]; then
38 echoscip-shell system . . echo. "Error creating dummy NAG library."
39 exit 1
40 fi
41
42 #**************************************************************
43
44
45 cd $MID_INSTALL
46
47 echoscip-shell system . . echo. ""
48 echoscip-shell system . . echo. "MIDAS INSTALLATION PROCEDURE"
49 echoscip-shell system . . echo. "============================"
50 echoscip-shell system . . echo. "MIDASHOME: $MIDASHOME"
51 echoscip-shell system . . echo. "MIDVERS: $MIDVERS"
52
53 if [scip-shell system . . `[`. $1 = "manual" ]; then
54 echoscip-shell system . . echo. "Your own MAKE_OPTIONS after checks and/or editing:"
55 else
56 echoscip-shell system . . echo. "Your final MAKE_OPTIONS after all checks:"
57 fi
58
59 echoscip-shell system . . echo. "<$MID_HOME/local/make_options>"
60
61 awkscip-shell system . . awk. -F# '{if ($1 != "") {printf "\t %s\n",$1} }' $MID_HOME/local/make_options
62 echoscip-shell system . . echo. ""
63
64 echoscip-shell system . . echo. "Do you want to check the OS library [yn]? (y): " $SV_NONL
65 unset answ
66 if [scip-shell system . . `[`. "$1" != "-a" ]; then
67 read answ
68 fi
69 if [scip-shell system . . `[`. -z "$answ" ]; then
70 answ=y
71 fi
72 if [scip-shell system . . `[`. "$answ" = "y" -o "$answ" = "Y" ]
73 then
74 cd $MID_HOME/libsrc/os/unix
75 rmscip-shell system . . rm. -f $MID_HOME/lib/libos.a
76 makescip-shell system . . make. clean_exec
77 makescip-shell system . . make. clean
78 makescip-shell system . . make. all
79 makescip-shell system . . make. testos.exe
80 if [scip-shell system . . `[`. $? != 0 ]; then
81 echoscip-shell system . . echo. ""
82 echoscip-shell system . . echo. " **********************************************"
83 echoscip-shell system . . echo. " * ATTENTION *"
84 echoscip-shell system . . echo. " * There was a severe error in your <oslib.a> *"
85 echoscip-shell system . . echo. " * that should be corrected before continuing *"
86 echoscip-shell system . . echo. " * with the MIDAS installation. *"
87 echoscip-shell system . . echo. " * *"
88 echoscip-shell system . . echo. " * Go to $MID_HOME/libsrc/os/unix "
89 echoscip-shell system . . echo. " * and type by hand: *"
90 echoscip-shell system . . echo. " * *"
91 echoscip-shell system . . echo. " * make clean_exec *"
92 echoscip-shell system . . echo. " * make clean *"
93 echoscip-shell system . . echo. " * make all *"
94 echoscip-shell system . . echo. " * make testos.exe *"
95 echoscip-shell system . . echo. " * *"
96 echoscip-shell system . . echo. " * The sequence above should be executed *"
97 echoscip-shell system . . echo. " * without any error (Warnings are tolerated) *"
98 echoscip-shell system . . echo. " * MIDAS installation will be aborted !! *"
99 echoscip-shell system . . echo. " * *"
100 echoscip-shell system . . echo. " * For help contact ESO's Midas support: *"
101 echoscip-shell system . . echo. " * [email protected] *"
102 echoscip-shell system . . echo. " **********************************************"
103 echoscip-shell system . . echo. ""
104 $echo "Type return to exit: " $SV_NONL
105 read return
106 exit 1
107 fi
108 fi
109
110 echoscip-shell system . . echo. ""
111 echoscip-shell system . . echo. "WARNING: MIDAS installation will delete all dependent files."
112 echoscip-shell system . . echo. ""
113 echoscip-shell system . . echo. "Do you want to continue [yn]? (y): " $SV_NONL
114 unset answ
115 if [scip-shell system . . `[`. "$1" != "-a" ]; then
116 read answ
117 fi
118 if [scip-shell system . . `[`. -z "$answ" ]; then
119 answ=y
120 fi
121 if [scip-shell system . . `[`. "$answ" != "y" -a "$answ" != "Y" ]
122 then
123 echoscip-shell system . . echo. "Bye"
124 exit 0
125 fi
126
127 #
128 # if $MID_HOME/tmp does not exist then create it
129 #
130 if [scip-shell system . . `[`. ! -d $MID_HOME/tmp ]; then
131 mkdirscip-shell system . . mkdir. $MID_HOME/tmp
132 fi
133
134 # do we have the 'time' command?
135 if [scip-shell system . . `[`. $CMND_YES = 2 ] ; then
•136 /bin/bashscip-shell filesystem . . `/bin/bash`. $MID_INSTALL/install -i
137 else
•138 time /bin/bashscip-shell filesystem . . `/bin/bash`. $MID_INSTALL/install -i
139 fi
140
141 exit 0