mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 12:39:25 +02:00
+ added delete option
This commit is contained in:
parent
23c3b52d7f
commit
ab19c5ae95
@ -20,8 +20,9 @@ program makehtm;
|
||||
uses sysutils;
|
||||
|
||||
Var
|
||||
Verbose : Boolean;
|
||||
FileCount : Boolean;
|
||||
Verbose : Boolean;
|
||||
FileCount : Boolean;
|
||||
DeleteHtml : Boolean;
|
||||
|
||||
Procedure ConvertFile (FileName : String);
|
||||
|
||||
@ -55,6 +56,12 @@ begin
|
||||
finally
|
||||
Close(InFile);
|
||||
end;
|
||||
If DeleteHtml then
|
||||
begin
|
||||
If Verbose then
|
||||
Writeln('Deleting input file : ',FileName);
|
||||
DeleteFile(FileName);
|
||||
end;
|
||||
except
|
||||
On E : Exception do
|
||||
Writeln('Error converting ',FileName,' to ',OFileName,' : ',E.Message);
|
||||
@ -121,9 +128,13 @@ Var
|
||||
I : integer;
|
||||
|
||||
begin
|
||||
Verbose:=False;
|
||||
DeleteHtml:=False;
|
||||
For I:=1 to ParamCount do
|
||||
If paramstr(i)='-v' then
|
||||
Verbose:=True;
|
||||
Verbose:=True
|
||||
else if paramstr(i)='-r' then
|
||||
DeleteHtml:=True;
|
||||
end;
|
||||
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user