summaryrefslogtreecommitdiff
path: root/lib/sbin/CVSUpdate.pl
diff options
context:
space:
mode:
authortradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-05-05 15:44:03 +0000
committertradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-05-05 15:44:03 +0000
commit6c935b075c92c86a7c97b2ad40ca15525a3e3e9b (patch)
tree09641a5b91083dc15c3172c4ac4705c12f3ab9f7 /lib/sbin/CVSUpdate.pl
parent6e2628dc95c587726cb8543c44c244627b7d553a (diff)
Fixed cases where chdir('..') was used which caused problems with symlinks.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3691 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/CVSUpdate.pl')
-rw-r--r--lib/sbin/CVSUpdate.pl32
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/sbin/CVSUpdate.pl b/lib/sbin/CVSUpdate.pl
index fea04c81..60177f87 100644
--- a/lib/sbin/CVSUpdate.pl
+++ b/lib/sbin/CVSUpdate.pl
@@ -2,10 +2,10 @@
# @file CVSUpdate.pl
# @date Tue Nov 21 2000
# @author Gabrielle Allen
-# @desc
+# @desc
# Updates Cactus checkout
# (avoids problems with different versions of cvs client)
-# @enddesc
+# @enddesc
# @version $Header$
#@@*/
@@ -44,32 +44,33 @@ if ($debug)
if (!$debug)
{
open (CS, "$command |");
- while (<CS>)
- {
+ while (<CS>)
+ {
print ;
}
close (CS);
}
-($package_dir, $thornlist) = @ARGV;
+($arrangement_dir, $thornlist) = @ARGV;
if ($thornlist =~ /^$/) {
- %info = &buildthorns($package_dir,"thorns");
+ %info = &buildthorns($arrangement_dir,"thorns");
} else {
%info = &ReadThornlist($thornlist);
}
-$current_dir = `pwd`;
-chdir $package_dir;
+$home = `pwd`;
+chomp ($home);
foreach $thorn (sort keys %info)
{
-
if( ! -d "$thorn/CVS")
{
print "Ignoring $thorn - no CVS directory\n";
next;
}
- chdir $thorn;
+
+ chdir ("$arrangement_dir/$thorn") ||
+ die "Cannot change to thorn directory '$arrangement_dir/$thorn'\n";
print("\nUpdating $thorn\n");
$command = "cvs $cvs_ops update $cvs_update_ops $cvs_symbolic_name";
if($debug)
@@ -85,21 +86,20 @@ foreach $thorn (sort keys %info)
open (FILE, "<CVS/$file") || die "Could not open CVS file";
while (<FILE>)
{
- print;
+ print;
}
}
}
if (!$debug)
{
open (CS, "$command |");
- while (<CS>)
- {
+ while (<CS>)
+ {
print ;
- }
+ }
}
- chdir "../..";
}
-chdir $current_dir;
+ chdir $home) || die "Cannot change back to Cactus home directory '$home'\n";
exit;