2
# .COPYRIGHT: Copyright (c) 2011 European Southern Observatory,
6
# .LANGUAGE shell script
7
# .ENVIRONMENT Unix Systems. Executable under SHELL and C-SHELL
8
# .COMMENTS Installation procedure of the MIDAS system starting from
10
# Usage: install system [options]
18
#*************** building dummy NAG library *********************
20
# the install3 script is called from install1 with one parameter
21
# par1 = manual (to use an edited make_options file),
22
# or = -a (via autoconfig)
23
# or no parameter at all
25
cd $MID_HOME/system/ext
28
echo "Error building esoext."
32
cd $MID_HOME/libsrc/nag
33
rm -f ../../lib/libnag.a
37
echo "Error creating dummy NAG library."
43
#**************************************************************
49
echo "MIDAS INSTALLATION PROCEDURE"
50
echo "============================"
51
echo "MIDASHOME: $MIDASHOME"
52
echo "MIDVERS: $MIDVERS"
54
if [ $1 = "manual" ]; then
55
echo "Your own MAKE_OPTIONS after checks and/or editing:"
57
echo "Your final MAKE_OPTIONS after all checks:"
60
echo "<$MID_HOME/local/make_options>"
62
awk -F# '{if ($1 != "") {printf "\t %s\n",$1} }' $MID_HOME/local/make_options
65
echo "Do you want to check the OS library [yn]? (y): " $SV_NONL
67
if [ "$1" != "-a" ]; then
70
if [ -z "$answ" ]; then
73
if [ "$answ" != "y" -a "$answ" != "Y" ]
77
cd $MID_HOME/libsrc/os/unix
78
rm -f $MID_HOME/lib/libos.a
85
echo " **********************************************"
87
echo " * There was a severe error in your <oslib.a> *"
88
echo " * that should be corrected before continuing *"
89
echo " * with the MIDAS installation. *"
91
echo " * Go to $MID_HOME/libsrc/os/unix "
92
echo " * and type by hand: *"
94
echo " * make clean_exec *"
95
echo " * make clean *"
97
echo " * make testos.exe *"
99
echo " * The sequence above should be executed *"
100
echo " * without any error (Warnings are tolerated) *"
101
echo " * MIDAS installation will be aborted !! *"
103
echo " * For help contact ESO's Midas support: *"
104
echo " * midas@eso.org *"
105
echo " **********************************************"
107
$echo "Type return to exit: " $SV_NONL
114
echo "WARNING: MIDAS installation will delete all dependent files."
115
echo " It will run in background and the output will be sent to"
116
echo " the file <$MID_HOME/tmp/install.$$>"
118
echo "Do you want to continue [yn]? (y): " $SV_NONL
120
if [ "$1" != "-a" ]; then
123
if [ -z "$answ" ]; then
126
if [ "$answ" != "y" -a "$answ" != "Y" ]
133
# if $MID_HOME/tmp does not exist then create it
135
if [ ! -d $MID_HOME/tmp ]; then
139
# do we have the 'time' command?
140
if [ $CMND_YES = 2 ] ; then
141
/bin/bash $MID_INSTALL/install -i > $MID_HOME/tmp/install.$$ 2>&1 &
143
time /bin/bash $MID_INSTALL/install -i > $MID_HOME/tmp/install.$$ 2>&1 &
146
echo "Running install in background"
147
echo "Results are coming in $MID_HOME/tmp/install.$$"
148
if [ "$1" = "-a" ]; then
149
echo "Waiting for MIDAS installation to finish..." $SV_NONL