-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_demo_slide.pl
executable file
·116 lines (109 loc) · 2.69 KB
/
install_demo_slide.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#!/usr/bin/perl
# ^^^^^^^^^
# CUSTOMIZE THIS TO POINT TO YOUR PERL BINARY!!!!
#
# SLIDE installation script Volker Schnecke Fri Sep 17 15:43:08 EDT 1999
#
# to run: ./install_slide.pl
if ( $ENV{"SLIDE_DIR"} eq "" )
{
print "set environment variable SLIDE_DIR to point to this directory\n";
exit;
}
$slide_dir = $ENV{"SLIDE_DIR"};
$perl = $^X;
# unpack the Perl scripts and change the path to the perl binary
open IN, "$slide_dir/src/scripts/perl_scripts";
print "\n*** extracting Perl scripts ***\n";
while ( <IN> )
{
if ( /^____FILE\_START/ )
{
chop;
# grep the name of packed Perl script
@line = split;
$file = "$slide_dir/bin/$line[1]";
open OUT, ">$file";
# read the line that includes the path to the Perl binary
$_ = <IN>;
print OUT "\#\!$perl\n";
next;
}
if ( /^____FILE\_END/ )
{
# end of this script, close filehandle and change permissions
close OUT;
chmod 0755, "$file";
next;
}
print OUT $_;
}
close IN;
# unpack the shell scripts
open IN, "$slide_dir/src/scripts/shell_scripts";
print "\n*** extracting Shell scripts ***\n";
while ( <IN> )
{
if ( /^____FILE\_START/ )
{
chop;
# grep the name of packed Perl script
@line = split;
$file = "$slide_dir/bin/$line[1]";
open OUT, ">$file";
next;
}
if ( /^____FILE\_END/ )
{
# end of this script, close filehandle and change permissions
close OUT;
chmod 0755, "$file";
next;
}
print OUT $_;
}
close IN;
# extract the cgi-bin perl scripts
open IN, "$slide_dir/src/scripts/cgi_scripts";
print "\n*** extracting cgi-bin scripts ***\n";
while ( <IN> )
{
if ( /^____FILE\_START/ )
{
chop;
# grep the name of packed Perl script
@line = split;
$file = "$slide_dir/cgi-bin/$line[1]";
open OUT, ">$file";
# read the line that includes the path to the Perl binary
$_ = <IN>;
print OUT "\#\!$perl\n";
next;
}
if ( /^____FILE\_END/ )
{
# end of this script, close filehandle and change permissions
close OUT;
chmod 0755, "$file";
next;
}
print OUT $_;
}
close IN;
print "*** The cgi-bin scripts must be moved to the cgi-bin ***\n".
"*** directory of the web server used to view results ***\n";
# compile SLIDE
#chdir "src/slide";
#print "\n*** compiling SLIDE ***\n\n";
#system "make";
# compile compute_interaction_centers, check_connectivity, and
# generate_rasmol_script
#chdir "../interactions";
#print "\n*** compiling interactions auxiliaries ***\n\n";
#system "make";
# compile average_template and unbiased_template
#chdir "../template";
#print "\n*** compiling template auxiliaries ***\n\n";
#system "make";
print "\n*** SLIDE installation completed ***\n";
print "\n\n*** Please see license.txt for licensing and use information ***\n\n";