]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - tools/cvs2sql.pl
Geaendert:
[people/pmueller/ipfire-2.x.git] / tools / cvs2sql.pl
diff --git a/tools/cvs2sql.pl b/tools/cvs2sql.pl
deleted file mode 100644 (file)
index 9cf69c8..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/usr/bin/perl\r
-#\r
-# This file is part of the IPCop Firewall.\r
-#\r
-# IPCop is free software; you can redistribute it and/or modify\r
-# it under the terms of the GNU General Public License as published by\r
-# the Free Software Foundation; either version 2 of the License, or\r
-# (at your option) any later version.\r
-#\r
-# IPCop is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-# GNU General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU General Public License\r
-# along with IPCop; if not, write to the Free Software\r
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA\r
-#\r
-# Copyright (C) 2003-02-04 Mark Wormgoor <mark@wormgoor.com>\r
-#\r
-\r
-# Usage:\r
-#\r
-# ./tools/cvs2sql.pl | grep -e INSERT -e UPDATE > lang_data.sql\r
-#\r
-\r
-# Get time\r
-($sec, $min, $hour, $day, $month, $year, $weekday, $dayofyear, $isdst) = localtime(time);\r
-$year += 1900;\r
-if ($month < 10) { $month = "0" . $month; }\r
-if ($day   < 10) { $day   = "0" . $day;   }\r
-if ($hour  < 10) { $hour  = "0" . $hour;  }\r
-if ($min   < 10) { $min   = "0" . $min;   }\r
-if ($sec   < 10) { $sec   = "0" . $sec;   }\r
-$lastchange = "$year$month$day$hour$sec";\r
-\r
-# Read English install file\r
-  undef $/;\r
-  open (FILE, "langs/en/install/lang_en.c") or die "Couldn't open English language file";\r
-  $file = <FILE>;\r
-  close (FILE);\r
-  $file =~ s/"\s*\\\s*\n"//g;\r
-  $file =~ s/",/"/g;\r
-  $file =~ s/\\n/\\\\n/g;\r
-  $file =~ s/^.*(TR_[\w]+).*$/$1/gm;\r
-  $file =~ s/(TR_\w+)\n(.*$)/INSERT INTO Lang_Data (VarName, EN_Word, Section, LastChange) Values ("$1", $2, "SETUP", "$lastchange");/gm;\r
-  print "$file";\r
-\r
-# Read English Perl file\r
-  do "langs/en/cgi-bin/en.pl" or die "Failed to open English web language file";\r
-  while( my ($key, $value) = each(%tr) ) {\r
-       $key = lc($key);\r
-       $value =~ s/\n//mg;\r
-       $value =~ s/\\*\"/\\"/g;\r
-       print "INSERT INTO Lang_Data (VarName, EN_Word, Section, LastChange) Values (\"$key\", \"$value\", \"WEB\", \"$lastchange\");\n";\r
-  }\r
-\r
-# Other language install files\r
-  while (($trans = glob("langs/*/install/lang_*.c") ))  {\r
-       if ( $trans =~ /lang_en.c/ ) { next; }\r
-       if ( $trans =~ /lang_el.c/ ) { next; }\r
-       open (FILE, "$trans") or die "Couldn't open language file: $trans";\r
-       $file = <FILE>;\r
-       close (FILE);\r
-       $trans =~ s/.*lang_(.*).c/$1/;\r
-       $trans = uc($trans);\r
-       $file =~ s/"\s*\\\s*\n"//g;\r
-       $file =~ s/",/"/g;\r
-       $file =~ s/\\n/\\\\n/g;\r
-       $file =~ s/^.*(TR_[\w]+).*$/$1/gm;\r
-       $file =~ s/(TR_\w+)\n(.*$)/UPDATE Lang_Data set ${trans}_Word = $2 where VarName = "$1";/gm;\r
-       print "$file";\r
-  }\r
-\r
-# Other language perl files\r
-  while (($trans = glob("langs/*/cgi-bin/*.pl") ))  {\r
-       if ( $trans =~ /en.pl/ ) { next; }\r
-       if ( $trans =~ /el.pl/ ) { next; }\r
-       %tr=();\r
-       do "$trans" or die "Failed to load translation file: $trans";\r
-       $trans =~ s/.*\/(\w+).pl/$1/;\r
-       $trans = uc($trans);\r
-       while( my ($key, $value) = each(%tr) ) {\r
-               $key = lc($key);\r
-               $value =~ s/\n//mg;\r
-               $value =~ s/\\*\"/\\"/g;\r
-               print "UPDATE Lang_Data set ${trans}_Word = \"$value\" where VarName = \"$key\";\n";\r
-       }\r
-  }\r