From 7b95f52718f8c85afa93b4f5297a5f366c19e6e6 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 5 Oct 2003 02:07:32 +0000 Subject: [PATCH] not longer needed --- setup/tools/splitlang.pl.txt | 45 --------------- setup/tools/sqltolang.pl.txt | 67 ---------------------- setup/tools/versions.pl.txt | 106 ----------------------------------- 3 files changed, 218 deletions(-) delete mode 100644 setup/tools/splitlang.pl.txt delete mode 100755 setup/tools/sqltolang.pl.txt delete mode 100644 setup/tools/versions.pl.txt diff --git a/setup/tools/splitlang.pl.txt b/setup/tools/splitlang.pl.txt deleted file mode 100644 index 35779f0589..0000000000 --- a/setup/tools/splitlang.pl.txt +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/perl - #**************************************************************************# - # phpGroupWare # - # http://www.phpgroupware.org # - # -------------------------------------------- # - # This program is free software; you can redistribute it and/or modify it # - # under the terms of the GNU General Public License as published by the # - # Free Software Foundation; either version 2 of the License, or (at your # - # option) any later version. # - #**************************************************************************# - - # $Id$ # - - # splitlang.pl (c) 2001 Miles Lott - # split common phpgw_LANG.lang files into seperate files for each app - # and language. Requires perl and the source lang files and a dir named - # 'tmp' in the current working dir. May only work in bash also. Makes - # system calls to mkdir and cat. - - $dir = opendir(DIR,'.'); - #@files = grep { /^phpgw_/ && -f "$dir/$_" } readdir(DIR); - @files = grep { /phpgw/ } readdir(DIR); - closedir(DIR); - - for $i (0..$#files) - { - # Run through each lang file - $_ = $files[$i]; - print "Working on: " . $_ . "\n"; - open(FILE,$_); - while () - { - chomp $_; - ($key,$appname,$lang,$content) = split("\t",$_); - if(!stat("tmp/$appname/setup")) - { - my $mkdir = "mkdir -p tmp/$appname/setup"; - system($mkdir); - } - my $cmd = 'echo "'. $_ . '" >> tmp/' . $appname . "/setup/phpgw_" . $lang . ".lang"; - system($cmd); - #print $appname . "\n"; - } - close(FILE); - } diff --git a/setup/tools/sqltolang.pl.txt b/setup/tools/sqltolang.pl.txt deleted file mode 100755 index cc35f0dbf8..0000000000 --- a/setup/tools/sqltolang.pl.txt +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/perl - #**************************************************************************# - # phpGroupWare # - # http://www.phpgroupware.org # - # -------------------------------------------- # - # This program is free software; you can redistribute it and/or modify it # - # under the terms of the GNU General Public License as published by the # - # Free Software Foundation; either version 2 of the License, or (at your # - # option) any later version. # - #**************************************************************************# - - # $Id$ # - - # sqltolang.pl (c) 2001 Miles Lott - # Take a file of sql commands for lang, create lang files from it - # Requires perl and the source sql file. - # May only work in bash also. Makes system calls to mkdir and cat. - # Takes one arg, the sql filename - - # Adjust to taste, this is not intended to be perfect - - sub trim - { - my @out = @_; - for (@out) - { - s/^\s+//; - s/\s+$//; - } - return wantarray ? @out : $out[0]; - } - - print "Working on: " . $ARGV[0] . "\n"; - open(FILE,$ARGV[0]); - while () - { - # INSERT INTO lang (message_id, app_name, lang, content) VALUES( 'common items','eldaptir','de','Common Items'); - chomp $_; - if (/DELETE/) - { - next; - } - $line = $_; - $line =~ s/REPLACE INTO lang \(//g; - $line =~ s/INSERT INTO lang \(//g; - $line =~ s/VALUES\( \'//g; - $line =~ s/message_id\,//g; - $line =~ s/app_name,//g; - $line =~ s/lang,//g; - $line =~ s/content\)//g; - $line =~ s/','/\t/g; - $line =~ s/'\);//g; - - ($key,$appname,$lang,$content) = split("\t",$line); - $key = &trim($key); - $appname = &trim($appname); - $lang = &trim($lang); - $content = &trim($content); - - if ($lang ne '') - { - $newline = $key . "\t" . $appname . "\t" . $lang . "\t" . $content; - my $cmd = 'echo "'. $newline . '" >> phpgw_' . $lang . ".lang"; - system($cmd); - } - } - close(FILE); diff --git a/setup/tools/versions.pl.txt b/setup/tools/versions.pl.txt deleted file mode 100644 index be930acfa0..0000000000 --- a/setup/tools/versions.pl.txt +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/perl - #**************************************************************************# - # phpGroupWare # - # http://www.phpgroupware.org # - # -------------------------------------------- # - # This program is free software; you can redistribute it and/or modify it # - # under the terms of the GNU General Public License as published by the # - # Free Software Foundation; either version 2 of the License, or (at your # - # option) any later version. # - #**************************************************************************# - - # $Id$ # - - # versions.pl (c) 2001 Miles Lott - # Extract and print all app versions, and create a versions.inc.php file. - # This would be run at each release to generate a tab-delimited listing - # of appnames and current versions. - - $installdir = '/usr/local/apache/htdocs/phpgroupware/'; - $count = $nover = $ver = $i = 0; - @info = @versions = (); - - sub get_versions() - { - $d = opendir(DIR,$installdir); - while($entry = readdir(DIR)) - { - $found = 0; - $_ = $entry; - if (/\A.\Z/) - { - next; - } - if (!(/setup/ || /tmp/)) - { - $setupdir = $installdir . $entry . '/setup/'; - my $f = $setupdir . 'setup.inc.php'; - if (stat($f)) - { - open(FILE,$f); - while() - { - $_ =~ s/"/'/g; - if (/((.*?)version')(.*?)=(.*?)'(.*?)';/) - { - $info[$i] = $entry . "\t" . $5 . "\n"; - $found = 1; - $ver++; - $count++; - } - } - close FILE; - } - if (!$found && stat($setupdir)) - { - $info[$i] = $entry . "\t0.0.0\n"; - $nover++; - $count++; - } - } - $i++; - } - close DIR; - } - - get_versions(); - - if(@info) - { - @versions = sort @info; - reset(@versions); - open(OUT,'>' . $installdir. '/setup/versions.inc.php'); - for $i (0..$#versions) - { - print $versions[$i]; - print OUT $versions[$i]; - } - close OUT; - printf('Found %s applications',$count); - print "\n"; - } - if ($ver) - { - if ($ver != $count) - { - printf('%s of these had a valid version string.',$ver); - } - else - { - print 'All had a valid version string.'; - } - print "\n"; - } - if ($nover) - { - if ($nover != $count) - { - printf('%s of these had no version string.',$nover); - } - else - { - print 'None had a valid version string.'; - } - print "\n"; - } -