ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/Spectre/configure.pl
Revision: 154
Committed: 2003-06-08T23:37:49-07:00 (22 years ago) by douglas
Content type: text/x-perl
File size: 839 byte(s)
Log Message:
Yes, that!

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 mount_smbfs |") || die "$0: $!";
36
37 $line = <WHICH>;
38 chomp($line);
39
40 my $smbclient = $line;
41
42 $line = <WHICH>;
43 chomp($line);
44
45 my $mount_smbfs = $line;
46
47 close(WHICH);
48
49 open(DATA, "> configure.h");
50
51 print DATA "\tconfig.install = \"$install\";\n";
52 print DATA "\tconfig.smbclient = \"$smbclient\";\n";
53 print DATA "\tconfig.mount_smbfs = \"$mount_smbfs\";\n";
54
55 close(DATA);
56 }

Properties

Name Value
svn:executable *