Browse Source

added fetchrfc.pl

Sam Flint 10 years ago
parent
commit
d895ab0c4a
1 changed files with 25 additions and 0 deletions
  1. 25 0
      fetchrfc.pl

+ 25 - 0
fetchrfc.pl

@@ -0,0 +1,25 @@
+#!/usr/bin/perl
+
+use LWP::Simple;
+$type = shift @ARGV;
+if($type eq '-rfc'){
+    $rfc = shift @ARGV;
+    getstore("http://flintfam.org/rfcs/rfc${rfc}.txt", "rfc${rfc}.txt");
+}elsif($type eq '-bcp'){
+    $bcp = shift @ARGV;
+    getstore("http://flintfam.org/rfcs/bcp/bcp${bcp}.txt", "bcp${bcp}.txt");
+}elsif($type eq '-fyi'){
+    $fyi = shift @ARGV;
+    getstore("http://flintfam.org/rfcs/fyi/fyi${fyi}.txt", "fyi${fyi}.txt");
+}elsif($type eq '-ien'){
+    $ien = shift @ARGV;
+    getstore("http://flintfam.org/rfcs/ien/ien${ien}.txt", "ien${ien}.txt");
+}elsif($type eq '-std'){
+    $std = shift @ARGV;
+    getstore("http://flintfam.org/rfcs/std/std${std}.txt", "std${std}.txt");
+}else{
+    $rfc = $type;
+    getstore("http://flintfam.org/rfcs/rfc${rfc}.txt", "rfc${rfc}.txt");
+}
+
+#getstor($url, $file)