ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/BuildPackageReqs
Revision: 1.2.2.1
Committed: Thu Jun 3 14:21:30 1999 UTC (25 years, 11 months ago) by williamc
Branch: V0_9branch
CVS Tags: V0_14_0, V0_12_12_4, V0_12_12_3, V0_13_3, V0_13_2, V0_12_12_2, V0_12_12_1, V0_12_12_0, PlayGround_0, V0_13_1, V0_13_0, V0_12_12, V0_12_11, V0_12_9b, V0_12_10, V0_12_9, V0_12_8, V0_12_7, V0_12_6, V0_12_5, V0_12_4, V0_12_3, V0_12_2, V0_12_1, V0_12_0, V0_11_4, V0_11_3, V0_11_2, V0_11_1, V0_11_0, V0_10_19, V0_10_18, V0_10_17, V0_10_16, V0_10_15, V0_10_14, V0_10_13, V0_10_12, V0_10_11, V0_10_10, V0_10_9, V0_10_8, V0_10_7, V0_10_6, V0_10_5, V0_10_4, V0_10_3, V0_10_2, V0_10_1, V0_10_0, V0_10_0beta, V0_9_42, V0_9_41, V0_9_40, V0_9_39, V0_9_38, V0_9_37, V0_9_36, V0_9_35, V0_9_34, V0_9_33, V0_9_32, V0_9_31, V0_9_30, V0_9_29, V0_9_28, V0_9_27, V0_9_26, V0_9_25, V0_9_24, V0_9_23, V0_9_22, V0_9_21, V0_9_20, V0_9_19, V0_9_18, V0_9_17, V0_9_16, V0_9_15, V0_9_14
Branch point for: HPWbranch
Changes since 1.2: +1 -1 lines
Log Message:
Cjange all scripts to use perl5

File Contents

# User Rev Content
1 williamc 1.2.2.1 #!/usr/local/bin/perl5
2 williamc 1.1 #
3     # build the package dependencies information file
4     #
5     # First argument is filename to build
6     # Following arguments are package names to update from
7    
8     $reqsfile=shift;
9 williamc 1.2 use Utilities::Switcher;
10 williamc 1.1
11     &initialise;
12     foreach $file ( @ARGV ) {
13     $hashtags={
14     'Use' => 'none',
15     'Use_StartTag' => 'Use_start'
16     };
17     $switch=Switcher->new($hashtags,"$file");
18     &finishup;
19     }
20    
21     sub Use_start {
22     my $name=shift;
23     my @var=@_;
24     my $hashref;
25    
26     $hashref=$switch->SetupValueHash(\@vars);
27     $switch->checkparam($hashref, $name, "name");
28    
29     print WORKFILE "local__$file:Use:$$hashref{name}\n";
30     }
31    
32     sub initialise {
33     open WORKFILE, ">$reqsfile.wk" ) or die "Unable to open $reqsfile.wk $!";
34     open ( REQSFILE , "<$reqsfile" );
35     while ( <REQSFILE> ) {
36     foreach $file ( @ARGV ) {
37     next if ( /^local__$file:Use:/ )
38     print WORKFILE $_;
39     }
40     }
41     close REQSFILE
42     }
43    
44     sub finishup {
45     use File::Copy;
46     close WORKFILE;
47     copy ( $reqsfile.wk, $reqsfile ) or die "Unable to update $reqsfile $!";
48     }