summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiggi Langauf <siggi@users.sourceforge.net>2002-06-22 09:07:30 +0000
committerSiggi Langauf <siggi@users.sourceforge.net>2002-06-22 09:07:30 +0000
commitddbf97b70e38f36a357ceba680884b6eaa4622e3 (patch)
tree50380b0d62a38599a15a539c49677d8f2297697e
parent1069c4602c05a92f21feb83f1c87acbd8b744864 (diff)
downloadxine-lib-ddbf97b70e38f36a357ceba680884b6eaa4622e3.tar.gz
xine-lib-ddbf97b70e38f36a357ceba680884b6eaa4622e3.tar.bz2
cleaning up
CVS patchset: 2125 CVS date: 2002/06/22 09:07:30
-rw-r--r--misc/Makefile.am6
-rwxr-xr-xmisc/upload.pl131
2 files changed, 3 insertions, 134 deletions
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<release-version>] [-s<section>] <file> [...]
-#
-# 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 = '<font face="Verdana,Helvetica,Arial" size=4>';
-$END_FONT = '</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 =~ /<h1>\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/^.*<h1>\s*$PROGRAM_NAME\s+$release\s*<\/h1>//si;
- $rel =~ s/<h1>.*$//si;
- if ($rel =~ /<h2>\s*$section\s*<\/h2>/si) {
- return;
- }
- else {
- print "creating new section \"$section\" for release $release.\n";
- unless ($thepage =~ /<h1>\s*$PROGRAM_NAME\s+$release\s*<\/h1>/si) {
- $thepage = "<h1>$PROGRAM_NAME $release</h1>\n" . $thepage;
- }
- $newSection = "<h2>$section</h2>\n\n$LINK_FONT\n$END_FONT\n\n\n";
- $thepage =~ /^(.*<h1>\s*$PROGRAM_NAME\s+$release\s*<\/h1>.*?)(<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*)/<a href=\"$FILE_SUBDIR\/\1\">\1<\/a> <br>\n/sg;
- $thepage =~ /^(.*<h1>\s*$PROGRAM_NAME\s+$release\s*<\/h1>.*?<h2>\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 = <STDIN>;
- $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");