summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/ctanupload
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-05-04 23:47:39 +0000
committerKarl Berry <karl@freefriends.org>2012-05-04 23:47:39 +0000
commit545b1514df34ddc6dbf6998ed523b87ff1a49b81 (patch)
tree29fa7cc7eaf1b66b8fe6448bf5f07610da5b931c /Master/texmf-dist/scripts/ctanupload
parentc2e7f2fda74cc370f1639a007b85581f79438b60 (diff)
ctanupload (4may12)
git-svn-id: svn://tug.org/texlive/trunk@26193 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/ctanupload')
-rwxr-xr-xMaster/texmf-dist/scripts/ctanupload/ctanupload.pl16
1 files changed, 9 insertions, 7 deletions
diff --git a/Master/texmf-dist/scripts/ctanupload/ctanupload.pl b/Master/texmf-dist/scripts/ctanupload/ctanupload.pl
index a365e7fd47a..716bc24b2aa 100755
--- a/Master/texmf-dist/scripts/ctanupload/ctanupload.pl
+++ b/Master/texmf-dist/scripts/ctanupload/ctanupload.pl
@@ -10,7 +10,7 @@ sub fromenv;
sub load_data;
sub save_data;
-my $VERSION = 'v1.2 from 2011/09/08';
+my $VERSION = 'v1.2a from 2012/05/03';
my %CTAN_SERVERURLS = (
dante => 'http://dante.ctan.org/upload.html',
uktug => 'http://www.tex.ac.uk/upload/',
@@ -232,6 +232,9 @@ while (my $arg = shift @ARGV) {
}
}
+$CTAN_URL = (values %CTAN_SERVERURLS)[int rand scalar values %CTAN_SERVERURLS]
+ if not defined $CTAN_URL;
+
PROMPT:
if ($PROMPT) {
@@ -340,8 +343,8 @@ if ($FIELDS{DoNotAnnounce}) {
$DoNotAnnounce = '[x]';
}
else {
- $FIELDS{DoNotAnnounce} = undef;
- $FIELDS{to_announce} = undef;
+ delete $FIELDS{DoNotAnnounce};
+ delete $FIELDS{to_announce};
$DoNotAnnounce = '[ ]';
}
@@ -350,9 +353,6 @@ if (!$FIELDS{directory}) {
}
-$CTAN_URL = (values %CTAN_SERVERURLS)[int rand scalar values %CTAN_SERVERURLS]
- if not defined $CTAN_URL;
-
print "\nThe following data will be submitted to CTAN ($CTAN_URL):\n";
foreach my $field (@FIELDS) {
@@ -427,12 +427,14 @@ $mech->submit_form(
);
if ($mech->success()) {
- print "Upload failed: ", $mech->response()->message(), "\n";
+ print "HTTP response code: ", $mech->response()->message(), "\n";
}
print "\nResponse:\n";
print LOG "\n# Response:\n" if $LOG;
eval {
+ #print $mech->content();
+ #return 1;
use HTML::TreeBuilder;
use HTML::FormatText;
my $tree = HTML::TreeBuilder->new_from_content( $mech->content() );