From: Anthony Minessale Date: Tue, 18 Jul 2006 16:57:16 +0000 (+0000) Subject: add syncrss.pl script for use with mod_rss X-Git-Tag: v1.0-beta1~2514 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=629ee71e8f78487407f76aa7f1ff19c341c7cbb2;p=thirdparty%2Ffreeswitch.git 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 --- diff --git a/scripts/rss/syncrss.pl b/scripts/rss/syncrss.pl new file mode 100755 index 0000000000..169682c954 --- /dev/null +++ b/scripts/rss/syncrss.pl @@ -0,0 +1,23 @@ +#!/usr/local/bin/perl + +my $home = shift; + +$home or die "Usage: $0 \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); +}