ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/Spectre/configure.pl
Revision: 159
Committed: 2003-06-09T20:12:03-07:00 (22 years ago) by douglas
Content type: text/x-perl
File size: 875 byte(s)
Log Message:
Wrote the config file and changed some stuff.

File Contents

# Content
1 #!/usr/bin/perl
2
3 use strict;
4
5 if ($#ARGV >= 0 && $ARGV[0] eq "-install")
6 {
7 open(DATA, "< configure.dat");
8
9 my $line = <DATA>;
10 chomp($line);
11
12 close(DATA);
13
14 print "$line\n";
15 }
16 else
17 {
18 my $install = "/usr/local/spectre";
19
20 print "Spectre install directory [$install]: ";
21 my $line = <STDIN>;
22 chomp $line;
23
24 if ($line ne "")
25 {
26 $install = $line;
27 }
28
29 open(DATA, "> configure.dat");
30
31 print DATA "$install\n";
32
33 close(DATA);
34
35 open(WHICH, "which smbclient |") || die "$0: $!";
36
37 $line = <WHICH>;
38 chomp($line);
39
40 close(WHICH);
41
42 my $smbclient = $line;
43
44 open(WHICH, "which mount |") || die "$0: $!";
45
46 $line = <WHICH>;
47 chomp($line);
48
49 close(WHICH);
50
51 my $mount = $line;
52
53 open(DATA, "> configure.h");
54
55 print DATA "\tconfig.install = \"$install\";\n";
56 print DATA "\tconfig.smbclient = \"$smbclient\";\n";
57 print DATA "\tconfig.mount = \"$install\";\n";
58
59 close(DATA);
60 }

Properties

Name Value
svn:executable *