mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
not longer needed
This commit is contained in:
parent
fd2d96d063
commit
7b95f52718
@ -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 (<FILE>)
|
||||
{
|
||||
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);
|
||||
}
|
@ -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 (<FILE>)
|
||||
{
|
||||
# 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);
|
@ -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(<FILE>)
|
||||
{
|
||||
$_ =~ 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";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user