Debian Codegraph @

wtools/INSTALL.acembly

raw
1 #!/bin/csh
2 # $Id: INSTALL.acembly,v 1.3 1997/10/08 15:21:03 mieg Exp $
3 ##########################################################################
4 # Ace.mbly installation script,
5 # Uses the acedb installation script with very minor modifications
6 # flagged by the $ACEMBLY variable
7 ##########################################################################
8 ################# A C.elegans database ###########################
9 ################# R.Durbin and J.Thierry-Mieg #########################
10 ################# #########################
11 ################# Installation script, june 91 #########################
12 ##########################################################################
13
14 # To install ACeDB, this file and the appropriate distribution tar.Z files
15 # should be in the same directory. See the NOTES file to find out which
16 # distribution tar.Z files you need for your site. You must have write
17 # access in the directory to be able to run the INSTALL script.
18
19 # We can provide executables for most X11-Unix platforms, like SUN
20 # DEC stations, Next, Alliant, Silicon Graphics, IBM
21 # and for PC-compatibles running the freeware Unix-OS called LINUX
22
23 # Go to the directory and, omitting the leading #, type the command
24 # chmod 755 INSTALL.acembly
25 # INSTALL ace.mbly
26
27 ###################################################################
28
29 echo ' '
30 echo 'ACEMBLY installation script'
31 echo ' '
32
33 setenv ici `pwd`
34
35 if ($USER == "root") then
36 echo 'You should not be root when installing ACEDB'
37 echo 'su to some other user name and try again'
38 exit
39 endif
40
41 echo 'We are going to install the acedb system in the present directory: '
42 echo -n " "
43 pwd
44 echo 'This is your available disk space in this directory: '
45 df .
46 echo ' '
47 echo "We need 10 MB for the installation."
48 echo -n "Should we proceed? Please answer yes/no : "
49
50 switch("$<")
51 case "yes":
52 case "y":
53 breaksw
54 default:
55 echo 'You did not answer yes, I quit'
56 exit
57 breaksw
58 endsw
59
60 echo 'Starting the installation'
61
62 if (! -e ACEMBLY.*.tar.gz) then
63 echo "I cannot find the ACEMBLY.tar.gz file, I quit"
64 exit 1
65 endif
66
67 mkdir ACEMBLY
68 if (! -d ACEMBLY) then
69 echo "I cannot create the ACEMBLY directory, I quit"
70 exit 1
71 endif
72
73 mkdir ACEMBLY/seqmgr
74 if !(-d ~/archive) then
75 mkdir ~/archive
76 echo 'I created an archive directory as ~/archive'
77 echo 'Preferably, it should be a link pointing to a different machine'
78 echo " this directory is used when you run the \'acembly -abi2ace\' command"
79 endif
80
81 foreach f (`ls $ici/ACEMBLY.*.tar.gz`)
82 echo Restoring files from $f
83 gunzip -c $f | tar xf -
84 if !(-e $ici/ACEMBLY/acembly) then
85 echo the command gunzip -c $f | tar xf - failed
86 echo most probably gunzip is missing on your machine
87 echo sorry, i can t decompress the acembly distribution
88 echo i quit
89 exit 1
90 endif
91 break
92 end
93
94 cd $ici
95 mkdir ACEDB
96 cd $ici/ACEDB
97
98 # next items fix problems in the tar.Z files
99 cd $ici/ACEDB
100 foreach f (`ls $ici/source.*.tar.gz`)
101 echo Restoring files from $f
102 gunzip -c $f | tar xf -
103 break
104 end
105
106 cd $ici/ACEDB
107 foreach f (`ls $ici/bin.*.tar.gz`)
108 echo Restoring files from $f
109 gunzip -c $f | tar xf -
110 break
111 end
112
113 cd $ici
114 echo 'chmod ACEMBLY/*'
115 chmod 755 ACEMBLY/*
116 ln -s ACEMBLY/acembly acembly
117
118 cd $ici/ACEDB
119 echo 'chmod ACEDB/bin*/*acembly*'
120 chmod 755 bin*/xacembly
121 chmod 755 bin*/tacembly
122 chmod 755 wscripts/*
123
124 foreach f (`\ls | grep bin`)
125 if (-d $f) then
126 echo linking $f
127 cd $f
128 setenv mybin `pwd`
129 cd $ici/ACEMBLY
130 ln -s $mybin $f
131 cd $ici/ACEDB
132 endif
133 end
134
135 if (-d wmake && -e wmake/makefile) ln -s wmake/makefile makefile
136
137 echo ' '
138 echo 'Before running the program, each user must define the'
139 echo 'environment variable ACEMBLY and put this directory in his path.'
140 echo 'Do this either by copying into their .login or .cshrc file the commands:'
141 echo ' '
142 echo "setenv ACEMBLY $ici/ACEMBLY"
143 echo 'set path = ($path ' "$ici" '/ACEMBLY)'
144 echo ' '
145
146 echo 'If you need to recompile you need:'
147 echo -n " setenv ACEDB_SRC "
148 echo `pwd`
149 echo ' and also '
150 echo ' setenv ACEDB_MACHINE one of SUN, DEC etc, see wmake/truemake'
151 echo ' '
152 echo -n 'Hit return to proceed'
153 switch("$<")
154 default:
155 breaksw
156 endsw
157 echo ' '
158 echo 'For more information :'
159 echo 'a) Read ACEMBLY/USAGE and the documentation'
160 echo 'b) Use the on-line help (help key or F1 or F10), while running acembly'
161 echo 'c) Use e-mail : [email protected]'
162 echo ' '
163 echo 'Let us know if this installation script does not work.'
164 echo ' '
165 echo 'If you received no error message the installation is complete'
166 echo ' '
167 echo 'The command acembly will start the program.'
168 echo 'The first time you run you must do'
169 echo 'acembly -Create clone_name'
170 echo ' '
171 echo 'After testing the program, archive and remove the tarfiles'
172 echo ' '
173 echo "If you do not object, a report of the installation will now be mailed"
174 echo 'to the developpers of acembly and you will be added to our mailing list'
175 echo ' '
176 echo -n 'Should we mail this report ? Please answer yes ! (or no) '
177
178 switch("$<")
179 case "no": case "n":
180 setenv Mail_status 0
181 breaksw
182 default:
183 setenv Mail_status 1
184 echo "merci"
185 exit
186 breaksw
187 endsw
188
189
190 cd $ici
191
192 ## Report attempt to Acedb authors
193
194 echo 'acembly 4.5_f install attempt' > ! toto
195 echo `hostname` >> toto
196 echo `uname -a` >> toto
197 echo `date` >> toto
198 echo `whoami` >> toto
199 echo `pwd` >> toto
200 ls bin.*.gz source.*.gz >> toto
201
202 if ($Mail_status == 1) then
203 mail [email protected] < toto
204 endif
205
206 echo 'This is an automatically generated report of the installation of' >! toto1
207 echo 'the acembly software.' >> toto1
208 echo ' ' >> toto1
209 echo ' ' >> toto1
210 cat toto >> toto1
211
212 mail root < toto1
213
214 \rm toto toto1
215 echo ok, the installation is finished
216 ## end of Installation script ##