#!/usr/bin/ruby require "tempfile" REPOS, REVISION = ARGV[0], ARGV[1] xml = `/usr/local/bin/svn log --xml --revision #{REVISION}:1 --limit 40 file://#{REPOS}` feed = nil Tempfile.open('svn2rss') do |f| f.write(xml) f.close feed = `/usr/bin/xsltproc --stringparam title "XlSuite.org Commit Log" \\ --stringparam self "http://xlsuite.org/commit-log.xml" \\ --stringparam logo-url http://xlsuite.org/img/XLsuite-logotype.gif \\ --stringparam feed-id http://xlsuite.org/commit-log.xml \\ --stringparam entry-id-prefix http://xlsuite.org/commit-log/ \\ --stringparam updated \`date -u +%Y-%m-%dT%H:%M:%SZ\` \\ #{REPOS}/hooks/tools/svn2rss.xsl #{f.path}` end File.open("/usr/local/www/xlsuite.org/current/public/commit-log.xml", "wb") do |f| f.write(feed) end