forked from Mirrors/freeswitch
add syncrss.pl script for use with mod_rss
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1954 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
f5ea0ca767
commit
629ee71e8f
|
@ -0,0 +1,23 @@
|
|||
#!/usr/local/bin/perl
|
||||
|
||||
my $home = shift;
|
||||
|
||||
$home or die "Usage: $0 <dir>\n";
|
||||
chdir($home);
|
||||
|
||||
my $hash = {
|
||||
'freeswitch.rss' => 'http://www.freeswitch.org/xml.php'
|
||||
};
|
||||
|
||||
|
||||
foreach (keys %{$hash}) {
|
||||
my ($dl) = $hash->{$_} =~ /\/([^\/]+)$/;
|
||||
|
||||
my $cmd = "rm -f $_ $dl ; wget $hash->{$_}";
|
||||
if ($dl ne $_) {
|
||||
$cmd .= "; /bin/mv $dl $_";
|
||||
}
|
||||
$cmd .= "\n";
|
||||
print $cmd;
|
||||
system($cmd);
|
||||
}
|
Loading…
Reference in New Issue