1 | #!/bin/bash |
---|
2 | |
---|
3 | SELF=$ARBHOME/SOURCE_TOOLS/generate_all_links.sh |
---|
4 | |
---|
5 | finderr() { |
---|
6 | FOUND=`grep -Hn "$1" $SELF` |
---|
7 | if [ -z $FOUND ]; then |
---|
8 | echo "$SELF:8: $2 ($1 not located -- search manually)" |
---|
9 | else |
---|
10 | echo "$FOUND $2" |
---|
11 | fi |
---|
12 | false |
---|
13 | } |
---|
14 | |
---|
15 | symlink_maybe_no_target() { |
---|
16 | test -h $2 || ln -sf $1 $2 || finderr $2 "Failed to link '$1->$2'" |
---|
17 | } |
---|
18 | |
---|
19 | symlink() { |
---|
20 | if [ -z $2 ]; then |
---|
21 | if [ -z $1 ]; then |
---|
22 | echo "$SELF:22: Missing arguments in call to symlink()" |
---|
23 | exit 1 |
---|
24 | else |
---|
25 | finderr $1 "Second argument missing in call to symlink()" |
---|
26 | exit 1 |
---|
27 | fi |
---|
28 | fi |
---|
29 | |
---|
30 | DIR=`dirname $2` |
---|
31 | if [ -z $DIR ]; then |
---|
32 | DIR=. |
---|
33 | fi |
---|
34 | |
---|
35 | (test -e $DIR/$1 || finderr $1 "Target '$DIR/$1 does not exists (anymore)" ) && |
---|
36 | (test -e $2 || (test -h $2 && |
---|
37 | (finderr $2 "Warning Symlink '$2' points to nowhere -- removing wrong link";ls -al $2;rm $2;true) |
---|
38 | ) || true) && |
---|
39 | symlink_maybe_no_target $1 $2 |
---|
40 | } |
---|
41 | |
---|
42 | arbdb_symlink() { |
---|
43 | symlink ../ARBDB/$1 ARBDBS/$1 && |
---|
44 | symlink ../ARBDB/$1 ARBDB2/$1 |
---|
45 | } |
---|
46 | |
---|
47 | makedir() { |
---|
48 | mkdir -p $1 || finderr $1 "Failed to create directory '$1'" |
---|
49 | } |
---|
50 | |
---|
51 | # Generates some directories as well: |
---|
52 | makedir INCLUDE && |
---|
53 | makedir INCLUDE/GL && |
---|
54 | |
---|
55 | makedir NAMES_COM/GENC && |
---|
56 | makedir NAMES_COM/GENH && |
---|
57 | makedir NAMES_COM/O && |
---|
58 | |
---|
59 | makedir PROBE_COM/GENC && |
---|
60 | makedir PROBE_COM/GENH && |
---|
61 | makedir PROBE_COM/O && |
---|
62 | |
---|
63 | makedir LIBLINK && |
---|
64 | makedir MAKEBIN && |
---|
65 | makedir lib/help && |
---|
66 | |
---|
67 | (test -d lib/pts || makedir lib/pts) && |
---|
68 | |
---|
69 | # Liblink |
---|
70 | |
---|
71 | # symlink ../ARBDB/libARBDB.sl LIBLINK/libARBDB.sl |
---|
72 | symlink_maybe_no_target ../ARBDB/libARBDB.so LIBLINK/libARBDB.so && |
---|
73 | symlink_maybe_no_target ../ARBDB/libARBDB.so.2.0 LIBLINK/libARBDB.so.2.0 && |
---|
74 | symlink_maybe_no_target ../ARBDB2/libARBDB.a LIBLINK/libARBDO.a && |
---|
75 | # symlink ../ARBDB2/libARBDB.sl LIBLINK/libARBDO.sl |
---|
76 | symlink_maybe_no_target ../ARBDB2/libARBDB.so LIBLINK/libARBDO.so && |
---|
77 | symlink_maybe_no_target ../ARBDB2/libARBDB.so.2.0 LIBLINK/libARBDO.so.2.0 && |
---|
78 | symlink_maybe_no_target ../ARBDBPP/libARBDBPP.a LIBLINK/libARBDBPP.a && |
---|
79 | # symlink ../ARBDBPP/libARBDBPP.sl LIBLINK/libARBDBPP.sl |
---|
80 | symlink_maybe_no_target ../ARBDBPP/libARBDBPP.so LIBLINK/libARBDBPP.so && |
---|
81 | symlink_maybe_no_target ../ARBDBPP/libARBDBPP.so.2.0 LIBLINK/libARBDBPP.so.2.0 && |
---|
82 | symlink_maybe_no_target ../ARBDBS/libARBDB.a LIBLINK/libARBDB.a && |
---|
83 | symlink_maybe_no_target ../AWT/libAWT.a LIBLINK/libAWT.a && |
---|
84 | # symlink ../AWT/libAWT.sl LIBLINK/libAWT.sl |
---|
85 | symlink_maybe_no_target ../AWT/libAWT.so LIBLINK/libAWT.so && |
---|
86 | symlink_maybe_no_target ../AWT/libAWT.so.2.0 LIBLINK/libAWT.so.2.0 && |
---|
87 | symlink_maybe_no_target ../WINDOW/libAW.a LIBLINK/libAW.a && |
---|
88 | # symlink ../WINDOW/libAW.sl LIBLINK/libAW.sl |
---|
89 | symlink_maybe_no_target ../WINDOW/libAW.so LIBLINK/libAW.so && |
---|
90 | symlink_maybe_no_target ../WINDOW/libAW.so.2.0 LIBLINK/libAW.so.2.0 && |
---|
91 | |
---|
92 | # Motif stuff |
---|
93 | (test -z $MOTIF_LIBPATH || symlink $MOTIF_LIBPATH LIBLINK/libXm.so.3) && |
---|
94 | |
---|
95 | # Links in bin directory |
---|
96 | ( cd bin ; make all; cd .. ) && |
---|
97 | |
---|
98 | # ...COMS |
---|
99 | |
---|
100 | symlink ../AISC_COM/AISC NAMES_COM/AISC && |
---|
101 | symlink ../AISC_COM/C NAMES_COM/C && |
---|
102 | |
---|
103 | symlink_maybe_no_target GENH/aisc_com.h NAMES_COM/names_client.h && |
---|
104 | symlink_maybe_no_target GENH/aisc_server_proto.h NAMES_COM/names_prototypes.h && |
---|
105 | symlink_maybe_no_target GENH/aisc.h NAMES_COM/names_server.h && |
---|
106 | |
---|
107 | symlink ../AISC_COM/AISC PROBE_COM/AISC && |
---|
108 | symlink ../AISC_COM/C PROBE_COM/C && |
---|
109 | |
---|
110 | symlink_maybe_no_target GENH/aisc_com.h PROBE_COM/PT_com.h && |
---|
111 | symlink_maybe_no_target GENH/aisc_server_proto.h PROBE_COM/PT_server_prototypes.h && |
---|
112 | symlink_maybe_no_target GENH/aisc.h PROBE_COM/PT_server.h && |
---|
113 | |
---|
114 | # TEMPLATES directory |
---|
115 | |
---|
116 | symlink ../TEMPLATES/SIG_PF.h INCLUDE/SIG_PF.h && |
---|
117 | symlink ../TEMPLATES/arb_debug.h INCLUDE/arb_debug.h && |
---|
118 | symlink ../TEMPLATES/arb_version.h INCLUDE/arb_version.h && |
---|
119 | symlink ../TEMPLATES/arbtools.h INCLUDE/arbtools.h && |
---|
120 | symlink ../TEMPLATES/attributes.h INCLUDE/attributes.h && |
---|
121 | symlink ../TEMPLATES/config_parser.h INCLUDE/config_parser.h && |
---|
122 | symlink ../TEMPLATES/inline.h INCLUDE/inline.h && |
---|
123 | symlink ../TEMPLATES/output.h INCLUDE/output.h && |
---|
124 | symlink ../TEMPLATES/perf_timer.h INCLUDE/perf_timer.h && |
---|
125 | symlink ../TEMPLATES/smartptr.h INCLUDE/smartptr.h && |
---|
126 | symlink ../TEMPLATES/static_assert.h INCLUDE/static_assert.h && |
---|
127 | |
---|
128 | symlink_maybe_no_target ../TEMPLATES/arb_build.h INCLUDE/arb_build.h && |
---|
129 | symlink_maybe_no_target ../TEMPLATES/svn_revision.h INCLUDE/svn_revision.h && |
---|
130 | |
---|
131 | # INCLUDE directory |
---|
132 | |
---|
133 | symlink_maybe_no_target ../NAMES_COM/names_client.h INCLUDE/names_client.h && |
---|
134 | symlink_maybe_no_target ../NAMES_COM/names_prototypes.h INCLUDE/names_prototypes.h && |
---|
135 | symlink_maybe_no_target ../NAMES_COM/names_server.h INCLUDE/names_server.h && |
---|
136 | |
---|
137 | symlink_maybe_no_target ../PROBE_COM/PT_com.h INCLUDE/PT_com.h && |
---|
138 | symlink_maybe_no_target ../PROBE_COM/PT_server.h INCLUDE/PT_server.h && |
---|
139 | symlink_maybe_no_target ../PROBE_COM/PT_server_prototypes.h INCLUDE/PT_server_prototypes.h && |
---|
140 | |
---|
141 | symlink ../AISC_COM/C/aisc_func_types.h INCLUDE/aisc_func_types.h && |
---|
142 | symlink ../AISC_COM/C/client.h INCLUDE/client.h && |
---|
143 | symlink ../AISC_COM/C/client_privat.h INCLUDE/client_privat.h && |
---|
144 | symlink ../AISC_COM/C/server.h INCLUDE/server.h && |
---|
145 | symlink ../AISC_COM/C/struct_man.h INCLUDE/struct_man.h && |
---|
146 | symlink ../AISC_COM/C/aisc_global.h INCLUDE/aisc_global.h && |
---|
147 | symlink ../ARBDB/adGene.h INCLUDE/adGene.h && |
---|
148 | symlink ../ARBDB/ad_prot.h INCLUDE/ad_prot.h && |
---|
149 | symlink ../ARBDB/ad_config.h INCLUDE/ad_config.h && |
---|
150 | symlink ../ARBDB/ad_t_prot.h INCLUDE/ad_t_prot.h && |
---|
151 | symlink ../ARBDB/ad_k_prot.h INCLUDE/ad_k_prot.h && |
---|
152 | symlink ../ARBDB/arb_assert.h INCLUDE/arb_assert.h && |
---|
153 | symlink ../ARBDB/arbdb.h INCLUDE/arbdb.h && |
---|
154 | symlink ../ARBDB/arbdb_base.h INCLUDE/arbdb_base.h && |
---|
155 | symlink ../ARBDB/arbdbt.h INCLUDE/arbdbt.h && |
---|
156 | symlink ../ARBDBPP/adtools.hxx INCLUDE/adtools.hxx && |
---|
157 | symlink ../ARBDBPP/arbdb++.hxx INCLUDE/arbdb++.hxx && |
---|
158 | symlink ../ARB_GDE/gde.hxx INCLUDE/gde.hxx && |
---|
159 | symlink ../AWT/awt.hxx INCLUDE/awt.hxx && |
---|
160 | symlink ../AWT/awt_advice.hxx INCLUDE/awt_advice.hxx && |
---|
161 | symlink ../AWT/awt_asciiprint.hxx INCLUDE/awt_asciiprint.hxx && |
---|
162 | symlink ../AWT/awt_attributes.hxx INCLUDE/awt_attributes.hxx && |
---|
163 | symlink ../AWT/awt_canvas.hxx INCLUDE/awt_canvas.hxx && |
---|
164 | symlink ../AWT/awt_codon_table.hxx INCLUDE/awt_codon_table.hxx && |
---|
165 | symlink ../AWT/awt_config_manager.hxx INCLUDE/awt_config_manager.hxx && |
---|
166 | symlink ../AWT/awt_csp.hxx INCLUDE/awt_csp.hxx && |
---|
167 | symlink ../AWT/awt_dtree.hxx INCLUDE/awt_dtree.hxx && |
---|
168 | symlink ../AWT/awt_hotkeys.hxx INCLUDE/awt_hotkeys.hxx && |
---|
169 | symlink ../AWT/awt_input_mask.hxx INCLUDE/awt_input_mask.hxx && |
---|
170 | symlink ../AWT/awt_item_sel_list.hxx INCLUDE/awt_item_sel_list.hxx && |
---|
171 | symlink ../AWT/awt_iupac.hxx INCLUDE/awt_iupac.hxx && |
---|
172 | symlink ../AWT/awt_macro.hxx INCLUDE/awt_macro.hxx && |
---|
173 | symlink ../AWT/awt_map_key.hxx INCLUDE/awt_map_key.hxx && |
---|
174 | symlink ../AWT/awt_nds.hxx INCLUDE/awt_nds.hxx && |
---|
175 | symlink ../AWT/awt_preset.hxx INCLUDE/awt_preset.hxx && |
---|
176 | symlink ../AWT/awt_pro_a_nucs.hxx INCLUDE/awt_pro_a_nucs.hxx && |
---|
177 | symlink ../AWT/awt_sel_boxes.hxx INCLUDE/awt_sel_boxes.hxx && |
---|
178 | symlink ../AWT/awt_seq_colors.hxx INCLUDE/awt_seq_colors.hxx && |
---|
179 | symlink ../AWT/awt_seq_dna.hxx INCLUDE/awt_seq_dna.hxx && |
---|
180 | symlink ../AWT/awt_seq_protein.hxx INCLUDE/awt_seq_protein.hxx && |
---|
181 | symlink ../AWT/awt_seq_simple_pro.hxx INCLUDE/awt_seq_simple_pro.hxx && |
---|
182 | symlink ../AWT/awt_translate.hxx INCLUDE/awt_translate.hxx && |
---|
183 | symlink ../AWT/awt_tree.hxx INCLUDE/awt_tree.hxx && |
---|
184 | symlink ../AWT/awt_tree_cb.hxx INCLUDE/awt_tree_cb.hxx && |
---|
185 | symlink ../AWT/awt_tree_cmp.hxx INCLUDE/awt_tree_cmp.hxx && |
---|
186 | symlink ../AWT/awt_www.hxx INCLUDE/awt_www.hxx && |
---|
187 | symlink ../AWT/awtlocal.hxx INCLUDE/awtlocal.hxx && |
---|
188 | symlink ../AWTC/awtc_constructSequence.hxx INCLUDE/awtc_constructSequence.hxx && |
---|
189 | symlink ../AWTC/awtc_next_neighbours.hxx INCLUDE/awtc_next_neighbours.hxx && |
---|
190 | symlink ../AWTC/awtc_seq_search.hxx INCLUDE/awtc_seq_search.hxx && |
---|
191 | symlink ../AWTC/awtc_submission.hxx INCLUDE/awtc_submission.hxx && |
---|
192 | symlink ../AWTI/awti_export.hxx INCLUDE/awti_export.hxx && |
---|
193 | symlink ../AWTI/awti_import.hxx INCLUDE/awti_import.hxx && |
---|
194 | symlink ../BUGEX/bugex.h INCLUDE/bugex.h && |
---|
195 | symlink ../CONSENSUS_TREE/CT_ctree.hxx INCLUDE/CT_ctree.hxx && |
---|
196 | symlink ../DIST/dist.hxx INCLUDE/dist.hxx && |
---|
197 | symlink ../EDIT4/ed4_extern.hxx INCLUDE/ed4_extern.hxx && |
---|
198 | symlink ../GENOM/EXP.hxx INCLUDE/EXP.hxx && |
---|
199 | symlink ../GENOM/GEN.hxx INCLUDE/GEN.hxx && |
---|
200 | symlink ../GENOM_IMPORT/GenomeImport.h INCLUDE/GenomeImport.h && |
---|
201 | symlink ../ISLAND_HOPPING/island_hopping.h INCLUDE/island_hopping.h && |
---|
202 | symlink ../MERGE/mg_merge.hxx INCLUDE/mg_merge.hxx && |
---|
203 | symlink ../NTREE/ntree.hxx INCLUDE/ntree.hxx && |
---|
204 | symlink ../PRIMER_DESIGN/primer_design.hxx INCLUDE/primer_design.hxx && |
---|
205 | symlink ../PROBE_DESIGN/probe_design.hxx INCLUDE/probe_design.hxx && |
---|
206 | symlink ../SECEDIT/secedit_extern.hxx INCLUDE/secedit_extern.hxx && |
---|
207 | symlink ../SERVERCNTRL/servercntrl.h INCLUDE/servercntrl.h && |
---|
208 | symlink ../SEQ_QUALITY/seq_quality.h INCLUDE/seq_quality.h && |
---|
209 | symlink ../SL/AW_HELIX/AW_helix.hxx INCLUDE/AW_helix.hxx && |
---|
210 | symlink ../SL/AW_NAME/AW_rename.hxx INCLUDE/AW_rename.hxx && |
---|
211 | symlink ../SL/DB_SCANNER/db_scanner.hxx INCLUDE/db_scanner.hxx && |
---|
212 | symlink ../SL/FAST_ALIGNER/fast_aligner.hxx INCLUDE/fast_aligner.hxx && |
---|
213 | symlink ../SL/FILE_BUFFER/FileBuffer.h INCLUDE/FileBuffer.h && |
---|
214 | symlink ../SL/HELIX/BI_helix.hxx INCLUDE/BI_helix.hxx && |
---|
215 | symlink ../SL/REGEXPR/RegExpr.hxx INCLUDE/RegExpr.hxx && |
---|
216 | symlink ../SL/TREE_READ/TreeRead.h INCLUDE/TreeRead.h && |
---|
217 | symlink ../SL/TREE_WRITE/TreeWrite.h INCLUDE/TreeWrite.h && |
---|
218 | symlink ../STAT/st_window.hxx INCLUDE/st_window.hxx && |
---|
219 | symlink ../WINDOW/aw_awars.hxx INCLUDE/aw_awars.hxx && |
---|
220 | symlink ../WINDOW/aw_color_groups.hxx INCLUDE/aw_color_groups.hxx && |
---|
221 | symlink ../WINDOW/aw_device.hxx INCLUDE/aw_device.hxx && |
---|
222 | symlink ../WINDOW/aw_global_awars.hxx INCLUDE/aw_global_awars.hxx && |
---|
223 | symlink ../WINDOW/aw_keysym.hxx INCLUDE/aw_keysym.hxx && |
---|
224 | symlink ../WINDOW/aw_position.hxx INCLUDE/aw_position.hxx && |
---|
225 | symlink ../WINDOW/aw_preset.hxx INCLUDE/aw_preset.hxx && |
---|
226 | symlink ../WINDOW/aw_question.hxx INCLUDE/aw_question.hxx && |
---|
227 | symlink ../WINDOW/aw_root.hxx INCLUDE/aw_root.hxx && |
---|
228 | symlink ../WINDOW/aw_window.hxx INCLUDE/aw_window.hxx && |
---|
229 | symlink ../WINDOW/aw_global.hxx INCLUDE/aw_global.hxx && |
---|
230 | symlink ../WINDOW/aw_window_Xm_interface.hxx INCLUDE/aw_window_Xm_interface.hxx && |
---|
231 | symlink ../WINDOW/aw_font_group.hxx INCLUDE/aw_font_group.hxx && |
---|
232 | symlink ../XML/xml.hxx INCLUDE/xml.hxx && |
---|
233 | |
---|
234 | # gl stuff |
---|
235 | symlink ../../GL/glpng/glpng.h INCLUDE/GL/glpng.h && |
---|
236 | symlink ../../GL/glAW/aw_window_ogl.hxx INCLUDE/GL/aw_window_ogl.hxx && |
---|
237 | |
---|
238 | # arbdb dirs |
---|
239 | |
---|
240 | arbdb_symlink AD_MOBJECTS.h && |
---|
241 | arbdb_symlink adChangeKey.c && |
---|
242 | arbdb_symlink adExperiment.c && |
---|
243 | arbdb_symlink adGene.c && |
---|
244 | arbdb_symlink adGene.h && |
---|
245 | arbdb_symlink adRevCompl.c && |
---|
246 | arbdb_symlink adTest.c && |
---|
247 | arbdb_symlink ad_config.c && |
---|
248 | arbdb_symlink ad_config.h && |
---|
249 | arbdb_symlink ad_core.c && |
---|
250 | arbdb_symlink ad_load.c && |
---|
251 | arbdb_symlink ad_lpro.h && |
---|
252 | arbdb_symlink ad_prot.h && |
---|
253 | arbdb_symlink ad_save_load.c && |
---|
254 | arbdb_symlink ad_t_lpro.h && |
---|
255 | arbdb_symlink ad_t_prot.h && |
---|
256 | arbdb_symlink adcomm.c && |
---|
257 | arbdb_symlink adcompr.c && |
---|
258 | arbdb_symlink adhash.c && |
---|
259 | arbdb_symlink adhashtools.c && |
---|
260 | arbdb_symlink adindex.c && |
---|
261 | arbdb_symlink adlang1.c && |
---|
262 | arbdb_symlink adlink.c && |
---|
263 | arbdb_symlink adlmacros.h && |
---|
264 | arbdb_symlink adlocal.h && |
---|
265 | arbdb_symlink adlundo.h && |
---|
266 | arbdb_symlink admalloc.c && |
---|
267 | arbdb_symlink admap.c && |
---|
268 | arbdb_symlink admap.h && |
---|
269 | arbdb_symlink admatch.c && |
---|
270 | arbdb_symlink admath.c && |
---|
271 | arbdb_symlink adoptimize.c && |
---|
272 | arbdb_symlink adperl.c && |
---|
273 | arbdb_symlink adquery.c && |
---|
274 | arbdb_symlink adseqcompr.c && |
---|
275 | arbdb_symlink adsocket.c && |
---|
276 | arbdb_symlink adsort.c && |
---|
277 | arbdb_symlink adstring.c && |
---|
278 | arbdb_symlink adsystem.c && |
---|
279 | arbdb_symlink adtables.c && |
---|
280 | arbdb_symlink adtcp.c && |
---|
281 | arbdb_symlink adtools.c && |
---|
282 | arbdb_symlink adali.c && |
---|
283 | arbdb_symlink adcolumns.c && |
---|
284 | arbdb_symlink adtree.c && |
---|
285 | arbdb_symlink adname.c && |
---|
286 | arbdb_symlink aditem.c && |
---|
287 | arbdb_symlink adtune.c && |
---|
288 | arbdb_symlink adtune.h && |
---|
289 | arbdb_symlink arbdb.c && |
---|
290 | arbdb_symlink arbdb.h && |
---|
291 | arbdb_symlink arbdbpp.cxx && |
---|
292 | arbdb_symlink arbdbt.h && |
---|
293 | |
---|
294 | # small dirs |
---|
295 | |
---|
296 | symlink ../WINDOW/AW_preset.cxx AWT/AWT_preset.cxx && |
---|
297 | symlink ../WINDOW/aw_def.hxx AWT/aw_def.hxx && |
---|
298 | |
---|
299 | symlink ../EDIT/edit_naligner.cxx EDIT4/edit_naligner.cxx && |
---|
300 | symlink ../EDIT/edit_naligner.hxx EDIT4/edit_naligner.hxx && |
---|
301 | |
---|
302 | symlink ../LIBLINK NALIGNER/LIBLINK && |
---|
303 | |
---|
304 | symlink ../LIBLINK TOOLS/LIBLINK && |
---|
305 | |
---|
306 | symlink_maybe_no_target ../AISC/aisc MAKEBIN/aisc && |
---|
307 | symlink_maybe_no_target ../AISC_MKPTPS/aisc_mkpt MAKEBIN/aisc_mkpt && |
---|
308 | |
---|
309 | # help files (make sure the file is present in user distribution!) |
---|
310 | |
---|
311 | symlink_maybe_no_target ../help/input_mask_format.hlp lib/inputMasks/format.readme && |
---|
312 | symlink ../../GDEHELP lib/help/GDEHELP && |
---|
313 | |
---|
314 | echo "generate_all_links.sh done." |
---|