]>
git.ipfire.org Git - thirdparty/grsecurity-scrape.git/blob - scrape.pl
6 use LWP
::Simple
'get', 'getstore';
7 use File
::Basename
'dirname', 'basename';
10 my $script_dir = abs_path
(dirname
(__FILE__
));
12 print("Getting rss feed ...\n");
13 my $feed_raw = get
("https://grsecurity.net/testing_rss.php");
15 my $feed = XMLin
($feed_raw, ForceArray
=> ['item']);
20 for(@
{$feed->{channel
}->{item
}}) {
22 $filename = basename
($link);
23 if ( ! -e
$script_dir . "/test/". $filename ) {
25 print("Downloading ", $filename, " ...\n");
26 getstore
($link . ".sig", $script_dir . "/test/" . $filename . ".sig");
27 getstore
($link, $script_dir . "/test/" . $filename);
31 print("Downloading changelog-test.txt ...\n");
32 getstore
("https://grsecurity.net/changelog-test.txt", $script_dir . "/test/changelog-test.txt");
34 system("git", "add", $script_dir . "/test/" . $filename, $script_dir . "/test/changelog-test.txt", $script_dir . "/test/" . $filename . ".sig");
35 system("git", "commit", "-a", "-m", "Auto commit, " . $new_patches . " new patch{es}.");
36 system("git", "push");