summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-01-09 15:38:28 +0100
committerErich Eckner <git@eckner.net>2018-01-09 15:38:28 +0100
commit0cb6da8778659926553487e8751f6685be5a79af (patch)
treee6b29fb66dd5b07121ea3c8d0de7d6dba9c11ac5
parent35e1e720ca84a92c5c8fa92f26a50bb088a4bcb4 (diff)
downloadMake-0cb6da8778659926553487e8751f6685be5a79af.tar.xz
tools.pas: testeObBefehlLokal respect env
-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;