ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/Spectre/pstream.pl
Revision: 151
Committed: 2003-06-08T17:27:06-07:00 (22 years ago) by douglas
Content type: text/x-perl
File size: 495 byte(s)
Log Message:
Made it work, somewhat.

File Contents

# Content
1 #!/usr/bin/perl
2
3 use strict;
4
5 if ($#ARGV >= 0 && $ARGV[0] eq "-include")
6 {
7 open(DATA, "< pstream.dat");
8
9 my $line = <DATA>;
10 chomp($line);
11
12 close(DATA);
13
14 print "$line\n";
15 }
16 else
17 {
18 open(FIND, "find / -name pstream.h 2>/dev/null |") || die "$0: $!";
19
20 my $line = <FIND>;
21 chomp($line);
22
23 close(FIND);
24
25 if ($line =~ /^(.+)\/pstream\.h$/)
26 {
27 my $include = $1;
28
29 open(DATA, "> pstream.dat");
30
31 print DATA "$include\n";
32
33 close(DATA);
34 }
35 else
36 {
37 die "$0: pstream.h path not found";
38 }
39 }

Properties

Name Value
svn:executable *