mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 15:00:31 +02:00
tools: removed obsolete files related to cvs and .mo-files
git-svn-id: trunk@13370 -
This commit is contained in:
parent
99bf57cea8
commit
f928d1feca
5
.gitattributes
vendored
5
.gitattributes
vendored
@ -3438,11 +3438,7 @@ tools/apiwizz/apiwizz.pp svneol=native#text/pascal
|
|||||||
tools/check_ide_libs.sh -text svneol=native#application/x-sh
|
tools/check_ide_libs.sh -text svneol=native#application/x-sh
|
||||||
tools/convert_po_file_to_utf-8.sh svneol=native#text/plain
|
tools/convert_po_file_to_utf-8.sh svneol=native#text/plain
|
||||||
tools/copy_po_files_to_lazarus_sources.sh -text svneol=native#application/x-sh
|
tools/copy_po_files_to_lazarus_sources.sh -text svneol=native#application/x-sh
|
||||||
tools/cvs2cl.pl -text svneol=native#application/x-perl
|
|
||||||
tools/delete_non_cvs_files.pl -text svneol=native#application/x-perl
|
|
||||||
tools/delete_non_svn_files.pl svneol=native#text/plain
|
tools/delete_non_svn_files.pl svneol=native#text/plain
|
||||||
tools/find_non_cvs_files.pl -text svneol=native#application/x-perl
|
|
||||||
tools/getallmofiles.sh -text svneol=native#application/x-sh
|
|
||||||
tools/getallpofiles.sh -text svneol=native#application/x-sh
|
tools/getallpofiles.sh -text svneol=native#application/x-sh
|
||||||
tools/install/README.txt svneol=native#text/plain
|
tools/install/README.txt svneol=native#text/plain
|
||||||
tools/install/build_fpc_snaphot_rpm.sh svneol=native#text/plain
|
tools/install/build_fpc_snaphot_rpm.sh svneol=native#text/plain
|
||||||
@ -3471,7 +3467,6 @@ tools/install/cross_unix/debian_crosswin32/copyright svneol=native#text/plain
|
|||||||
tools/install/cross_unix/debian_crosswin32/postinst svneol=native#text/plain
|
tools/install/cross_unix/debian_crosswin32/postinst svneol=native#text/plain
|
||||||
tools/install/cross_unix/debian_crosswin32/postrm svneol=native#text/plain
|
tools/install/cross_unix/debian_crosswin32/postrm svneol=native#text/plain
|
||||||
tools/install/cross_unix/update_cross_fpc.sh svneol=native#text/plain
|
tools/install/cross_unix/update_cross_fpc.sh svneol=native#text/plain
|
||||||
tools/install/cvsexportlocal.pas svneol=native#text/pascal
|
|
||||||
tools/install/debian_fpc/changelog svneol=native#text/plain
|
tools/install/debian_fpc/changelog svneol=native#text/plain
|
||||||
tools/install/debian_fpc/changelog.Debian svneol=native#text/plain
|
tools/install/debian_fpc/changelog.Debian svneol=native#text/plain
|
||||||
tools/install/debian_fpc/control svneol=native#text/plain
|
tools/install/debian_fpc/control svneol=native#text/plain
|
||||||
|
2429
tools/cvs2cl.pl
2429
tools/cvs2cl.pl
File diff suppressed because it is too large
Load Diff
@ -1,142 +0,0 @@
|
|||||||
#!/usr/bin/env perl
|
|
||||||
#
|
|
||||||
# *****************************************************************************
|
|
||||||
# * *
|
|
||||||
# * See the file COPYING.modifiedLGPL, included in this distribution, *
|
|
||||||
# * for details about the copyright. *
|
|
||||||
# * *
|
|
||||||
# * This program is distributed in the hope that it will be useful, *
|
|
||||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
||||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
|
||||||
# * *
|
|
||||||
# *****************************************************************************
|
|
||||||
#
|
|
||||||
# Author: Mattias Gaertner
|
|
||||||
#
|
|
||||||
# This perl script deletes all files not in CVS.
|
|
||||||
|
|
||||||
use vars qw/ %opt /;
|
|
||||||
use Getopt::Std;
|
|
||||||
use Cwd;
|
|
||||||
my $opt_string = 'hd:rflqx';
|
|
||||||
getopts( "$opt_string", \%opt ) or usage();
|
|
||||||
usage() if $opt{h};
|
|
||||||
|
|
||||||
sub usage(){
|
|
||||||
print STDERR << "EOF";
|
|
||||||
|
|
||||||
Delete all files not in CVS
|
|
||||||
|
|
||||||
usage: $0 [-hdrflqx]
|
|
||||||
|
|
||||||
-h : this (help) message
|
|
||||||
-d <directory> : the directory where to search for files, default: current dir
|
|
||||||
-r : recursive: search in sub directories too
|
|
||||||
-f : delete only files, not directories
|
|
||||||
-q : quiet
|
|
||||||
-x : really delete them, default: simulate
|
|
||||||
|
|
||||||
examples:
|
|
||||||
delete_non_cvs_files.pl -r -d /your/lazarus/path
|
|
||||||
|
|
||||||
EOF
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$opt{d}){
|
|
||||||
$opt{d}=&getcwd;
|
|
||||||
}
|
|
||||||
|
|
||||||
$StartDir=$opt{d};
|
|
||||||
(-d $StartDir) || die "directory $StartDir is not a directory\n";
|
|
||||||
$StartDir=~s#//#/#g;
|
|
||||||
$StartDir=~s#/$##g;
|
|
||||||
|
|
||||||
&SearchDir($StartDir);
|
|
||||||
|
|
||||||
if(!$opt{x}){
|
|
||||||
print "\nThis was a simulation. To really delete files, use the -x option.\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
exit;
|
|
||||||
|
|
||||||
sub SearchDir(){
|
|
||||||
(my $CurDir)=@_;
|
|
||||||
my $line;
|
|
||||||
my $CVSEntries;
|
|
||||||
my @Files;
|
|
||||||
my $i;
|
|
||||||
my $CurFile;
|
|
||||||
my $CurFullFile;
|
|
||||||
|
|
||||||
# get CVS files
|
|
||||||
open(DIR, $CurDir."/CVS/Entries");
|
|
||||||
while($line=<DIR>){
|
|
||||||
($line=~/^\/([^\/]+)\//);
|
|
||||||
$CVSEntries.="\n".$1."\n";
|
|
||||||
}
|
|
||||||
close(DIR);
|
|
||||||
#print "$CVSEntries\n";
|
|
||||||
|
|
||||||
if($opt{r}){
|
|
||||||
# search recursive
|
|
||||||
# get files
|
|
||||||
opendir(DIR, $CurDir);
|
|
||||||
@Files = readdir(DIR);
|
|
||||||
closedir(DIR);
|
|
||||||
for ($i=0; $i<=$#Files; $i++){
|
|
||||||
$CurFile=$Files[$i];
|
|
||||||
$CurFullFile=$CurDir."/".$CurFile;
|
|
||||||
# skip special files
|
|
||||||
next unless ($CurFile);
|
|
||||||
next if (($CurFile eq '.') || ($CurFile eq '..') || ($CurFile eq 'CVS'));
|
|
||||||
&SearchDir($CurFullFile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# get files
|
|
||||||
opendir(DIR, $CurDir);
|
|
||||||
@Files = readdir(DIR);
|
|
||||||
closedir(DIR);
|
|
||||||
for ($i=0; $i<=$#Files; $i++){
|
|
||||||
$CurFile=$Files[$i];
|
|
||||||
$CurFullFile=$CurDir."/".$CurFile;
|
|
||||||
# skip special files
|
|
||||||
next unless ($CurFile);
|
|
||||||
next if (($CurFile eq '.') || ($CurFile eq '..') || ($CurFile eq 'CVS'));
|
|
||||||
# skip directories if not wanted
|
|
||||||
next if (($opt{f}) && (-d $CurFullFile));
|
|
||||||
# search file in CVS files
|
|
||||||
if($CVSEntries!~/\n$CurFile\n/){
|
|
||||||
if (-d $CurFullFile){
|
|
||||||
print "rmdir ".$CurFullFile."\n";
|
|
||||||
} else {
|
|
||||||
if (!$opt{q}){
|
|
||||||
print "unlink ".$CurFullFile."\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if($opt{x}){
|
|
||||||
if (-d $CurFullFile){
|
|
||||||
rmdir($CurFullFile);
|
|
||||||
} else {
|
|
||||||
unlink($CurFullFile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sub DoIt(){
|
|
||||||
(my $Command)=@_;
|
|
||||||
print $Command."\n";
|
|
||||||
if($opt{x}){
|
|
||||||
my $Output=`$Command`;
|
|
||||||
if($?){
|
|
||||||
die "Command failed:\n".$Output;
|
|
||||||
}
|
|
||||||
print $Output;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# end.
|
|
||||||
|
|
@ -1,125 +0,0 @@
|
|||||||
#!/usr/bin/env perl
|
|
||||||
#
|
|
||||||
# *****************************************************************************
|
|
||||||
# * *
|
|
||||||
# * See the file COPYING.modifiedLGPL, included in this distribution, *
|
|
||||||
# * for details about the copyright. *
|
|
||||||
# * *
|
|
||||||
# * This program is distributed in the hope that it will be useful, *
|
|
||||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
||||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
|
||||||
# * *
|
|
||||||
# *****************************************************************************
|
|
||||||
#
|
|
||||||
# Author: Mattias Gaertner
|
|
||||||
#
|
|
||||||
# This perl script lists all files not in CVS.
|
|
||||||
|
|
||||||
use vars qw/ %opt /;
|
|
||||||
use Getopt::Std;
|
|
||||||
use Cwd;
|
|
||||||
my $opt_string = 'hd:rfl';
|
|
||||||
getopts( "$opt_string", \%opt ) or usage();
|
|
||||||
usage() if $opt{h};
|
|
||||||
|
|
||||||
sub usage(){
|
|
||||||
print STDERR << "EOF";
|
|
||||||
|
|
||||||
lists all files not in CVS
|
|
||||||
|
|
||||||
usage: $0 [-hdrfl]
|
|
||||||
|
|
||||||
-h : this (help) message
|
|
||||||
-d <directory> : the directory where to search for files, default: current dir
|
|
||||||
-r : recursive: search in sub directories too
|
|
||||||
-f : show only files, not directories
|
|
||||||
-l : show as space divided list
|
|
||||||
|
|
||||||
examples:
|
|
||||||
find_non_cvs_files.pl -r -d /your/lazarus/path
|
|
||||||
|
|
||||||
EOF
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$opt{d}){
|
|
||||||
$opt{d}=&getcwd;
|
|
||||||
}
|
|
||||||
|
|
||||||
$StartDir=$opt{d};
|
|
||||||
(-d $StartDir) || die "directory $StartDir is not a directory\n";
|
|
||||||
$StartDir=~s#//#/#g;
|
|
||||||
$StartDir=~s#/$##g;
|
|
||||||
|
|
||||||
&SearchDir($StartDir);
|
|
||||||
|
|
||||||
exit;
|
|
||||||
|
|
||||||
sub SearchDir(){
|
|
||||||
(my $CurDir)=@_;
|
|
||||||
my $line;
|
|
||||||
my $CVSEntries;
|
|
||||||
my @Files;
|
|
||||||
my $i;
|
|
||||||
my $CurFile;
|
|
||||||
my $CurFullFile;
|
|
||||||
|
|
||||||
# get CVS files
|
|
||||||
open(DIR, $CurDir."/CVS/Entries");
|
|
||||||
while($line=<DIR>){
|
|
||||||
($line=~/^\/([^\/]+)\//);
|
|
||||||
$CVSEntries.="\n".$1."\n";
|
|
||||||
}
|
|
||||||
close(DIR);
|
|
||||||
#print "$CVSEntries\n";
|
|
||||||
|
|
||||||
# get files
|
|
||||||
opendir(DIR, $CurDir);
|
|
||||||
@Files = readdir(DIR);
|
|
||||||
closedir(DIR);
|
|
||||||
for ($i=0; $i<=$#Files; $i++){
|
|
||||||
$CurFile=$Files[$i];
|
|
||||||
$CurFullFile=$CurDir."/".$CurFile;
|
|
||||||
# skip special files
|
|
||||||
next unless ($CurFile);
|
|
||||||
next if (($CurFile eq '.') || ($CurFile eq '..') || ($CurFile eq 'CVS'));
|
|
||||||
# skip directories if not wanted
|
|
||||||
next if (($opt{f}) && (-d $CurFullFile));
|
|
||||||
# search file in CVS files
|
|
||||||
if($CVSEntries!~/\n$CurFile\n/){
|
|
||||||
print $CurFullFile;
|
|
||||||
if($opt{l}){
|
|
||||||
print " ";
|
|
||||||
} else {
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if($opt{r}){
|
|
||||||
# search recursive
|
|
||||||
for ($i=0; $i<=$#Files; $i++){
|
|
||||||
$CurFile=$Files[$i];
|
|
||||||
$CurFullFile=$CurDir."/".$CurFile;
|
|
||||||
# skip special files
|
|
||||||
next unless ($CurFile);
|
|
||||||
next if (($CurFile eq '.') || ($CurFile eq '..') || ($CurFile eq 'CVS'));
|
|
||||||
&SearchDir($CurFullFile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sub DoIt(){
|
|
||||||
(my $Command)=@_;
|
|
||||||
print $Command."\n";
|
|
||||||
if($opt{x}){
|
|
||||||
my $Output=`$Command`;
|
|
||||||
if($?){
|
|
||||||
die "Command failed:\n".$Output;
|
|
||||||
}
|
|
||||||
print $Output;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# end.
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
# Author: Mattias Gaertner
|
|
||||||
|
|
||||||
find . -name '*.mo' -exec echo -n $(basename {}) " " \;
|
|
||||||
|
|
||||||
|
|
||||||
# end.
|
|
||||||
|
|
@ -1,170 +0,0 @@
|
|||||||
{
|
|
||||||
***************************************************************************
|
|
||||||
* *
|
|
||||||
* This source 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. *
|
|
||||||
* *
|
|
||||||
* This code is distributed in the hope that it will be useful, but *
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
|
||||||
* General Public License for more details. *
|
|
||||||
* *
|
|
||||||
* A copy of the GNU General Public License is available on the World *
|
|
||||||
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
|
|
||||||
* obtain it by writing to the Free Software Foundation, *
|
|
||||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
||||||
* *
|
|
||||||
***************************************************************************
|
|
||||||
|
|
||||||
Author: Vincent Snijders
|
|
||||||
|
|
||||||
Name:
|
|
||||||
cvsexportlocal - creates a directory structure like 'cvs export' does.
|
|
||||||
|
|
||||||
Synopsis:
|
|
||||||
cvsexportlocal sourcedirectory destinationdirectory
|
|
||||||
|
|
||||||
Description:
|
|
||||||
cvsexportlocal assumes source directory is a local copy of a cvs
|
|
||||||
directory. It looks in the CVS subdirectory to see, what files and
|
|
||||||
directories are part of CVS and copies them recursively to the
|
|
||||||
destination directory.
|
|
||||||
}
|
|
||||||
program cvsexportlocal;
|
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
|
||||||
|
|
||||||
uses
|
|
||||||
Classes, SysUtils, FileUtil;
|
|
||||||
|
|
||||||
var
|
|
||||||
InputDir: string;
|
|
||||||
OutputDir: string;
|
|
||||||
|
|
||||||
type
|
|
||||||
TCvsDirectory = class
|
|
||||||
private
|
|
||||||
FDirectories: TStrings;
|
|
||||||
FDirectory: string;
|
|
||||||
FFiles: TStrings;
|
|
||||||
procedure LoadEntries;
|
|
||||||
public
|
|
||||||
constructor Create(ADirectory: string);
|
|
||||||
destructor Destroy; override;
|
|
||||||
property Files : TStrings read FFiles;
|
|
||||||
property Directories: TStrings read FDirectories;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ TCvsDirectory }
|
|
||||||
|
|
||||||
constructor TCvsDirectory.Create(ADirectory: string);
|
|
||||||
begin
|
|
||||||
FDirectory:= ADirectory;
|
|
||||||
FFiles:= TStringList.Create;
|
|
||||||
FDirectories := TStringList.Create;
|
|
||||||
LoadEntries;
|
|
||||||
end;
|
|
||||||
|
|
||||||
destructor TCvsDirectory.Destroy;
|
|
||||||
begin
|
|
||||||
FreeAndNil(FFiles);
|
|
||||||
FreeAndNil(FDirectories);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCvsDirectory.LoadEntries;
|
|
||||||
var
|
|
||||||
EntriesPath: string;
|
|
||||||
Entries: TStrings;
|
|
||||||
i: integer;
|
|
||||||
Name: string;
|
|
||||||
|
|
||||||
function IsDirectoryEntry(i: integer): boolean;
|
|
||||||
begin
|
|
||||||
result := (Length(Entries[i])>0) and (Entries[i][1]='D')
|
|
||||||
end;
|
|
||||||
|
|
||||||
function GetNameFromEntry(i: integer): string;
|
|
||||||
var
|
|
||||||
FirstSlashPos: integer;
|
|
||||||
SecondSlashPos: integer;
|
|
||||||
Entry: string;
|
|
||||||
begin
|
|
||||||
Entry := Entries[i];
|
|
||||||
FirstSlashPos := Pos('/',Entry);
|
|
||||||
SecondSlashPos := Pos('/',
|
|
||||||
Copy(Entry,FirstSlashPos+1,Length(Entry)-FirstSlashPos));
|
|
||||||
Result := Copy(Entry, FirstSlashPos + 1, SecondSlashPos-1);
|
|
||||||
end;
|
|
||||||
begin
|
|
||||||
EntriesPath := AppendPathDelim(FDirectory)+'CVS'+DirectorySeparator+'Entries';
|
|
||||||
Entries := TStringList.Create;
|
|
||||||
Entries.LoadFromFile(EntriesPath);
|
|
||||||
for i := 0 to Entries.Count-1 do begin
|
|
||||||
Name := GetNameFromEntry(i);
|
|
||||||
if Length(Name)>0 then
|
|
||||||
if IsDirectoryEntry(i) then
|
|
||||||
FDirectories.Add(Name)
|
|
||||||
else
|
|
||||||
FFiles.Add(Name);
|
|
||||||
end;
|
|
||||||
Entries.Free;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure Init;
|
|
||||||
begin
|
|
||||||
if ParamCount<2 then begin
|
|
||||||
writeln('Usage:');
|
|
||||||
writeln(' cvsexportlocal <sourcedirectory> <destinationdirectory>');
|
|
||||||
Halt;
|
|
||||||
end;
|
|
||||||
InputDir := ExpandFileName(ParamStr(1));
|
|
||||||
OutputDir := ExpandFileName(ParamStr(2));
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure CopyCvsDirectory(const SourceDir, DestinationDir: string);
|
|
||||||
var
|
|
||||||
CvsDirectory: TCvsDirectory;
|
|
||||||
i: Integer;
|
|
||||||
|
|
||||||
procedure CopyCvsFile(const FileName: string);
|
|
||||||
var
|
|
||||||
SourceFileName: string;
|
|
||||||
DestinationFileName: string;
|
|
||||||
begin
|
|
||||||
SourceFileName := AppendPathDelim(SourceDir)+FileName;
|
|
||||||
DestinationFileName := AppendPathDelim(DestinationDir)+FileName;
|
|
||||||
CopyFile(SourceFileName, DestinationFileName, true);
|
|
||||||
end;
|
|
||||||
begin
|
|
||||||
if DirectoryExists(DestinationDir) then
|
|
||||||
begin
|
|
||||||
writeln(format('Output directory %s exists. It will be deleted',
|
|
||||||
[DestinationDir]));
|
|
||||||
DeleteDirectory(DestinationDir, false);
|
|
||||||
end;
|
|
||||||
ForceDirectory(DestinationDir);
|
|
||||||
|
|
||||||
CvsDirectory := TCvsDirectory.Create(SourceDir);
|
|
||||||
try
|
|
||||||
for i:= 0 to CvsDirectory.Files.Count-1 do
|
|
||||||
CopyCvsFile(CvsDirectory.Files[i]);
|
|
||||||
for i:= 0 to CvsDirectory.Directories.Count-1 do
|
|
||||||
CopyCvsDirectory(AppendPathDelim(SourceDir)+CvsDirectory.Directories[i],
|
|
||||||
AppendPathDelim(DestinationDir)+CvsDirectory.Directories[i]);
|
|
||||||
finally
|
|
||||||
CvsDirectory.Free;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure Done;
|
|
||||||
begin
|
|
||||||
end;
|
|
||||||
|
|
||||||
begin
|
|
||||||
Init;
|
|
||||||
CopyCvsDirectory(InputDir, OutputDir);
|
|
||||||
Done;
|
|
||||||
end.
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user