[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pthreads-hackers] A simple perl script to create hard links.
From: |
James A Morrison |
Subject: |
[Pthreads-hackers] A simple perl script to create hard links. |
Date: |
Tue, 2 Apr 2002 22:56:38 -0500 (EST) |
Hi, this perl script creates hard links from the ptheads directory to
the libc directory. I have assumed that both are cvs checkouts and that
the libc checkout is at the same level as the pthreads checkout.
#!/bin/perl
link_dir(".");
sub link_dir {
my ($cur, @command, $dir) = @_;
opendir $dir, $cur;
while ($y = readdir ($dir)) {
if ( -d "$cur/$y" ) {
if (($y ne ".") && ($y ne "..") && ($y ne "CVS")) {
link_dir($cur . "/" .$y, "ln", "-f");
}
} else {
if (@command) {
mkdir ("../libc/" . $cur . "/");
system (@command , $cur . "/" . $y,
"../libc/" . $cur . "/" . $y);
}
}
}
close $dir;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pthreads-hackers] A simple perl script to create hard links.,
James A Morrison <=