]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - tools/fetchlangs.pl
git-svn-id: http://svn.ipfire.org/svn/ipfire/IPFire/source@31 ea5c0bd1-69bd-2848...
[people/pmueller/ipfire-2.x.git] / tools / fetchlangs.pl
1 #!/usr/bin/perl
2 #
3 # This file is part of the IPCop Firewall.
4 #
5 # IPCop is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # IPCop is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with IPCop; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 #
19 # Copyright (C) 2003-03-09 Mark Wormgoor <mark@wormgoor.com>
20 #
21
22 open(LIST, "./langs/list") or die 'Unable to open language list ./langs/list';
23
24 while (<LIST>) {
25 next if $_ =~ m/^#/;
26 @temp = split(/:/,$_);
27 $lang = $temp[0];
28 $uclang = uc($lang);
29 print "Downloading files for " . $temp[1] . "\n";
30 system ('wget','--quiet','-N','-c','--cache=off',"http://www.ipcop.org/langs/create-c.php?Lang=${uclang}");
31 rename ("create-c.php?Lang=${uclang}", "langs/${lang}/install/lang_${lang}.c") or die
32 'Failed to rename downloaded file: langs/${lang}/install/lang_${lang}.c';
33 system ('wget','--quiet','-N','-c','--cache=off',"http://www.ipcop.org/langs/create-pl.php?Lang=${uclang}");
34 rename ("create-pl.php?Lang=${uclang}", "langs/${lang}/cgi-bin/${lang}.pl") or die
35 'Failed to rename downloaded file: langs/${lang}/cgi-bin/${lang}.pl';
36 }
37 close (LIST)