[phpBB] svn: r59 - trunk/phpbb2

jeroen at wolffelaar.nl jeroen at wolffelaar.nl
Tue Feb 10 03:02:01 CET 2004


Author: jeroen
Date: 2004-02-10 03:01:20 +0100 (Tue, 10 Feb 2004)
New Revision: 59

Added:
   trunk/phpbb2/update_languages
Log:
Added script to make language packs uptodate


Added: trunk/phpbb2/update_languages
===================================================================
--- trunk/phpbb2/update_languages	2004-02-09 22:01:15 UTC (rev 58)
+++ trunk/phpbb2/update_languages	2004-02-10 02:01:20 UTC (rev 59)
@@ -0,0 +1,33 @@
+#!/usr/bin/perl -w
+use strict;
+
+`rm -f lang.*.info`;
+
+my @files;
+
+open DOWNLOADS, "wget -q -O- http://www.phpbb.com/downloads.php|";
+while (<DOWNLOADS>) {
+	m,prdownloads\.sourceforge\.net/phpbb/((?:lang|subSilver)_[^"]+\.tar\.gz),
+		or next;
+	push @files, $1;
+}
+close DOWNLOADS;
+
+for (@files) {
+	/([^_]+)_(.*)\.tar\.gz/;
+	my $prefix = $1 eq "lang" ? "" : "lang.";
+	open INFO, "> upstream/$prefix$1.$2.info";
+	print INFO "Filename=$_\n";
+	my $url = "http://cesnet.dl.sourceforge.net/sourceforge/phpbb/$_";
+	if ($url =~ m,[^a-z/_.:],i) {
+		die "Invalid character in language URL: $url\n";
+	}
+	print INFO "Url=$url\n";
+	system "wget -q -N -P.. $url";
+	print INFO "Md5=".`md5sum ../$_ | sed 's/ .*//'`;
+	print INFO "Copyright=Unknown\n";
+	print INFO "Include=yes\n";
+	close INFO;
+}
+
+


Property changes on: trunk/phpbb2/update_languages
___________________________________________________________________
Name: svn:executable
   + *





More information about the phpBB-l mailing list