#!/usr/bin/env perl use strict; my @files = glob ("thunderbird*"); for my $f (@files) { $f =~ /thunderbird-(3\.[^.]+)\.([^.]+)\.([^.]+)\.(.*)/; my ($version, $locale, $platform, $extension) = ($1, $2, $3, $4); # next if $platform eq 'win32'; print "mkdir -p $platform/$locale\n"; my $dstname; if ($platform eq 'linux-i686') { $dstname = "thunderbird-$version.$extension"; } elsif ($platform eq 'mac') { $dstname = "Thunderbird 3 Beta 2.dmg"; } elsif ($platform eq 'win32') { if ($extension eq 'installer.exe') { $dstname = "Thunderbird Setup 3 Beta 2.exe"; } elsif ($extension eq 'zip') { $dstname = "thunderbird-$version.zip"; } } print "mv $f '$platform/$locale/$dstname'\n"; } my @updates = glob("update/thunderbird*"); for my $f (@updates) { $f =~ /thunderbird-(3\.[^.]+)\.([^.]+)\.([^.]+)\.(.*)/; my ($version, $locale, $platform, $extension) = ($1, $2, $3, $4); ######### next if $platform eq 'win32'; print "mkdir -p update/$platform/$locale\n"; print "mv $f 'update/$platform/$locale/thunderbird-$version.complete.mar'\n"; } my @xpis = glob("*-xpi/thunderbird*"); for my $f (@xpis) { $f =~ /(.*)-xpi/; my $platform = $1; $platform = "win32" if $platform eq 'windows'; $platform = "linux-i686" if $platform eq 'linux'; # next if $platform eq 'win32'; $f =~ /thunderbird-(3\.[^.]+)\.([^.]+)\.(.*)/; my ($version, $locale, $extension) = ($1, $2, $3); # print "($version, $locale, $platform, $extension)\n"; print "mkdir -p $platform/xpi\n"; print "mv $f $platform/xpi/$locale.xpi\n"; } __END__ linux-xpi/thunderbird-3.0b2.af.langpack.xpi linux-xpi/thunderbird-3.0b2.ro.langpack.xpi mac-xpi/thunderbird-3.0b2.ja-JP-mac.langpack thunderbird-3.0b2.es-AR.mac.dmg thunderbird-3.0b2.id.win32.installer.exe thunderbird-3.0b2.pt-BR.win32.zip update thunderbird-3.0b2.es-AR.win32.installer.exe