mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 10:50:12 +02:00
Add -ll option to use longlog file
git-svn-id: trunk@26216 -
This commit is contained in:
parent
ffba5aee60
commit
360f53b742
@ -20,6 +20,9 @@ program prepup;
|
|||||||
uses
|
uses
|
||||||
sysutils,libtar,zstream;
|
sysutils,libtar,zstream;
|
||||||
|
|
||||||
|
const
|
||||||
|
use_longlog : boolean = false;
|
||||||
|
|
||||||
var
|
var
|
||||||
tarwriter : ttarwriter;
|
tarwriter : ttarwriter;
|
||||||
c : tgzfilestream;
|
c : tgzfilestream;
|
||||||
@ -64,18 +67,32 @@ Begin
|
|||||||
domask('*.log');
|
domask('*.log');
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
var
|
||||||
|
index : longint;
|
||||||
begin
|
begin
|
||||||
|
index:=1;
|
||||||
if paramcount<>1 then
|
if paramcount<>1 then
|
||||||
begin
|
begin
|
||||||
writeln('Usage: prepup <name of .tar.gz>');
|
if paramstr(1)='-ll' then
|
||||||
halt(1);
|
begin
|
||||||
|
use_longlog:=true;
|
||||||
|
index:=2;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
writeln('Usage: prepup [-ll] <name of .tar.gz>');
|
||||||
|
Writeln('Optional -ll parameter is used to specify use of longlog');
|
||||||
|
halt(1);
|
||||||
|
end
|
||||||
end;
|
end;
|
||||||
C:=TGZFileStream.Create(paramstr(1),gzOpenWrite);
|
C:=TGZFileStream.Create(paramstr(index),gzOpenWrite);
|
||||||
TarWriter := TTarWriter.Create (C);
|
TarWriter := TTarWriter.Create (C);
|
||||||
dosearch('.');
|
if not use_longlog then
|
||||||
|
dosearch('.');
|
||||||
TarWriter.AddFile('dbdigest.cfg');
|
TarWriter.AddFile('dbdigest.cfg');
|
||||||
TarWriter.AddFile('log');
|
TarWriter.AddFile('log');
|
||||||
|
if use_longlog then
|
||||||
|
TarWriter.AddFile('longlog');
|
||||||
TarWriter.free;
|
TarWriter.free;
|
||||||
c.free;
|
c.free;
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user