[Freeswitch-svn] [commit] r1954 - freeswitch/trunk/scripts/rss

Freeswitch SVN anthm at freeswitch.org
Tue Jul 18 12:57:16 EDT 2006


Author: anthm
Date: Tue Jul 18 12:57:16 2006
New Revision: 1954

Added:
   freeswitch/trunk/scripts/rss/syncrss.pl   (contents, props changed)

Log:
add syncrss.pl script for use with mod_rss

Added: freeswitch/trunk/scripts/rss/syncrss.pl
==============================================================================
--- (empty file)
+++ freeswitch/trunk/scripts/rss/syncrss.pl	Tue Jul 18 12:57:16 2006
@@ -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);
+}



More information about the Freeswitch-svn mailing list