version 1.2, 2005/03/22 23:44:43 |
version 1.4, 2005/03/24 19:51:50 |
|
|
&Get_Files_and_Dirs |
&Get_Files_and_Dirs |
); |
); |
|
|
our $BaseDir = '/home/ftp/pub'; |
our $BaseDir = '/home/ftp/pub'; |
our $TorrentDir = '/home/andrew/torrents'; |
our $TorrentDir = '/home/andrew/torrents'; |
our $BaseName = 'OpenBSD'; |
our $BaseName = 'OpenBSD'; |
our $Tracker = 'http://OpenBSD.somedomain.net/announce.php'; |
our $Tracker = 'http://OpenBSD.somedomain.net/announce.php'; |
|
|
# These are regexes that tell what files to skip; |
# These are regexes that tell what files to skip; |
our $SkipDirs = qr/\/patches$/; |
our $SkipDirs = qr/\/patches$/; |
|
|
{ |
{ |
my $basedir = shift; |
my $basedir = shift; |
opendir DIR, $basedir or die "Couldn't opendir $basedir: $!"; |
opendir DIR, $basedir or die "Couldn't opendir $basedir: $!"; |
my @contents = grep { ! /^\.\.$/ } grep { ! /^\.$/ } readdir DIR; |
my @contents = sort grep { ! /^\.\.$/ } grep { ! /^\.$/ } readdir DIR; |
closedir DIR; |
closedir DIR; |
my @dirs = grep { -d "$basedir/$_" } @contents; |
my @dirs = grep { -d "$basedir/$_" } @contents; |
|
|