blob: ee3a15956f8f07ab330672be542ca7ddead2b3ac (
plain)
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
|
#/*@@
# @file CVSUpdate.pl
# @date Tue Nov 21 2000
# @author Gabrielle Allen
# @desc
# Updates Cactus checkout
# (avoids problems with different versions of cvs client)
# @enddesc
# @version $Header$
#@@*/
require "lib/sbin/MakeUtils.pl";
$network = 1;
if (!$network)
{
print "DEBUG mode: cvs commands not issued\n\n";
}
$debug = 0;
print("\nUpdating Flesh\n");
$command = "cvs -z 3 -q update -d -P CONTRIBUTORS COPYRIGHT Makefile lib doc src";
if ($debug)
{
$this_dir = `pwd`;
chop($this_dir);
print "\nIn directory $this_dir\n";
print "Issuing command\n $command\n";
foreach $file (`ls CVS`)
{
chop($file);
print "Contents of $file\n";
open (FILE, "<CVS/$file") || die "Could not open CVS file";
while (<FILE>)
{
print;
}
}
}
if ($network)
{
open (CS, "$command |");
while (<CS>)
{
print ;
}
close (CS);
}
$package_dir = shift(@ARGV);
%info = &buildthorns($package_dir,"thorns");
$current_dir = `pwd`;
chdir $package_dir;
foreach $thorn (sort keys %info)
{
if( ! -d "$thorn/CVS")
{
print "Ignoring $thorn - no CVS directory\n";
next;
}
chdir $thorn;
print("\nUpdating $thorn\n");
$command = "cvs -z 3 -q update -d -P";
if($debug)
{
$this_dir = `pwd`;
chop($this_dir);
print "In directory $this_dir\n";
print "Issuing command\n $command\n";
foreach $file (`ls CVS`)
{
chop($file);
print "Contents of $file\n";
open (FILE, "<CVS/$file") || die "Could not open CVS file";
while (<FILE>)
{
print;
}
}
}
if ($network)
{
open (CS, "$command |");
while (<CS>)
{
print ;
}
}
chdir "../..";
}
chdir $current_dir;
exit;
|