From ddbf97b70e38f36a357ceba680884b6eaa4622e3 Mon Sep 17 00:00:00 2001 From: Siggi Langauf Date: Sat, 22 Jun 2002 09:07:30 +0000 Subject: cleaning up CVS patchset: 2125 CVS date: 2002/06/22 09:07:30 --- misc/Makefile.am | 6 +-- misc/upload.pl | 131 ------------------------------------------------------- 2 files changed, 3 insertions(+), 134 deletions(-) delete mode 100755 misc/upload.pl diff --git a/misc/Makefile.am b/misc/Makefile.am index cbfca9709..a9d43858f 100644 --- a/misc/Makefile.am +++ b/misc/Makefile.am @@ -1,8 +1,8 @@ SUBDIRS = fonts -EXTRA_DIST = autogen.sh upload.pl SlackBuild.in SlackBuild build_rpms.sh \ - xine-lib.spec.in xine-lib.spec xine-fontconv.c xine_logo.png \ - xine_logo.mpg vga.xinefont.gz make_release.sh +EXTRA_DIST = autogen.sh SlackBuild.in SlackBuild build_rpms.sh \ + xine-lib.spec.in xine-lib.spec xine-fontconv.c \ + xine_logo.mpg vga.xinefont.gz datadir = $(XINE_SKINDIR) data_DATA = xine_logo.png xine_logo.mpg diff --git a/misc/upload.pl b/misc/upload.pl deleted file mode 100755 index de28575d9..000000000 --- a/misc/upload.pl +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/perl -# -# upload.pl - upload files to the xine "Download" page -# -# usage: upload.pl [-y] [-r] [-s
] [...] -# -# OPTIONS: release-version: the version number of this file. If omitted, the -# newest version on the page is used. -# Only the last -r option counts. -# -# section: the heading under which this file should appear. If -# omitted, we'll try to autodetect it from the file suffix: -# .rpm => "RPMs" -# .tar.gz => "source tarball" -# .deb => "Debian" -# .dsc => "Debian" -# -# -y: don't ask for upload confirmation -# -# EXAMPLE: -# ./upload.pl -r1.0 xine_1.0_i386.deb -sSlackware xine-1.0.tar.gz -# - -## begin configuration ###################################################### - -$UPLOAD_HOST = "xine.sourceforge.net"; -$UPLOAD_PATH = "/home/groups/x/xi/xine/htdocs"; -$INDEX_FILE = "download.html"; -$FILE_SUBDIR = "files"; -$TMP_DIR = "/tmp/xine-upload.$$"; -$PROGRAM_NAME = "xine"; -$LINK_FONT = ''; -$END_FONT = ''; - -## end of configuration ##################################################### - -mkdir $TMP_DIR, 0755 || die "could not mkdir $TMP_DIR"; -mkdir "$TMP_DIR/$FILE_SUBDIR", 0755; - -print "fetching old Download page...\n"; -system ("scp $UPLOAD_HOST:$UPLOAD_PATH/$INDEX_FILE $TMP_DIR"); -open(IN, "$TMP_DIR/$INDEX_FILE") || die "unable to open $TMP_DIR/$INDEX_FILE"; -if (!read(IN, $thepage, 409600)) { - die "unable to read $TMP_DIR/$INDEX_FILE"; -} -close(IN); - -if ($thepage =~ /

\s*$PROGRAM_NAME\s+(\S+)\s*<\/h1>/si) { - $current_release=$1; - print "current release is $current_release.\n"; -} -else { - $current_release="(unknown version)"; - print "WARNING: could not find current release in download page.\n"; -} - -## parse command line -$section = "source tarball"; -$release = $current_release; -%files = (); -$yes = 0; - -foreach (@ARGV) { - if (/^\-r/) { - $release = $_; - $release =~ s/\-r//; - } - elsif (/^\-s/) { - $section = $_; - $section =~ s/\-s//; - } - elsif (/^\-y/) { - $yes = 1; - } - else { - die "$_: no such file" unless -f $_; - $filen = $_; - $filen =~ s/^.*?([^\/]*)$/\1/; - $files{$section} .= " $filen"; - print "will add $filen to section $section.\n"; - system("cp $_ '$TMP_DIR/$FILE_SUBDIR'"); - } -} -print "using release id $release.\n"; - -## add new files to the page -sub ensureSection() { #$section, $release - $rel = $thepage; - $rel =~ s/^.*

\s*$PROGRAM_NAME\s+$release\s*<\/h1>//si; - $rel =~ s/

.*$//si; - if ($rel =~ /

\s*$section\s*<\/h2>/si) { - return; - } - else { - print "creating new section \"$section\" for release $release.\n"; - unless ($thepage =~ /

\s*$PROGRAM_NAME\s+$release\s*<\/h1>/si) { - $thepage = "

$PROGRAM_NAME $release

\n" . $thepage; - } - $newSection = "

$section

\n\n$LINK_FONT\n$END_FONT\n\n\n"; - $thepage =~ /^(.*

\s*$PROGRAM_NAME\s+$release\s*<\/h1>.*?)(

.*)$/is; - $thepage = $1.$newSection.$2; - return; - } -} - -print "editing Download page...\n"; -foreach (keys(%files)) { - $section = $_; - ensureSection(); - $newLinks = $files{$section}; - print "file list for \"$section\": $newLinks\n"; - $newLinks =~ s/ (\S*)/\1<\/a>
\n/sg; - $thepage =~ /^(.*

\s*$PROGRAM_NAME\s+$release\s*<\/h1>.*?

\s*$section\s*<\/h2>.*?)($END_FONT.*)$/is; - $thepage = $1 . $newLinks . $2; -} - -open(OUT, ">$TMP_DIR/$INDEX_FILE"); -print OUT $thepage; -close(OUT); - -unless ($yes) { - print "\nAre you sure you want to upload files? [no] "; - $answer = ; - $yes = 1 if $answer =~ /^y/i; -} - -if ($yes) { - system("scp -r '$TMP_DIR/$INDEX_FILE' '$TMP_DIR/$FILE_SUBDIR' '$UPLOAD_HOST:$UPLOAD_PATH'"); -} - -system("rm -r $TMP_DIR"); -- cgit v1.2.3