summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools.pas18
1 files changed, 12 insertions, 6 deletions
diff --git a/tools.pas b/tools.pas
index a2fd04c..41dc44c 100644
--- a/tools.pas
+++ b/tools.pas
@@ -228,10 +228,10 @@ end;
procedure testeObBefehlLokal(bef, ordner: string; dateiListe: tMyStringList; lokTest: tRegExpr);
var
- exe,args,regex,oBef,s: string;
- dateien,sl,relZeil: tMyStringList;
- i,matchNum: longint;
- re: tRegExpr;
+ exe,args,regex,oBef,s: string;
+ dateien,sl,relZeil,env: tMyStringList;
+ i,matchNum: longint;
+ re: tRegExpr;
begin
bef:=trim(bef);
while notQuotedPos(';',bef)>0 do begin
@@ -246,6 +246,7 @@ begin
end;
oBef:=bef;
+ env:=tMyStringList.create;
args:='';
repeat
exe:=leftStr(bef,notQuotedPos(' ',bef)-1);
@@ -255,6 +256,7 @@ begin
delete(bef,1,notQuotedPos('|',bef));
end;
if notQuotedPos('=',exe)<>0 then begin
+ env.add(exe);
args:=args+' '+trim(copy(exe,notQuotedPos('=',exe)+1,length(exe)));
end;
bef:=trim(bef);
@@ -300,8 +302,11 @@ begin
(exe='latexmk') or
(exe='mpost') or
(exe='pdflatex') or
- (exe='sed') then
- exit
+ (exe='sha512sum') or
+ (exe='sed') then begin
+ env.free;
+ exit;
+ end
else begin
regex:='';
re:=tRegExpr.create;
@@ -325,6 +330,7 @@ begin
sl:=tMyStringList.create;
for i:=0 to dateien.count-1 do begin
sl.loadFromFile(dateien[i]);
+ sl.shellSubst(env);
if exe='epost' then begin
sl.grep(regex+'|^[!?]');
sl.unfoldMacros;