diff options
author | Erich Eckner <git@eckner.net> | 2018-01-09 15:38:28 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-01-09 15:38:28 +0100 |
commit | 0cb6da8778659926553487e8751f6685be5a79af (patch) | |
tree | e6b29fb66dd5b07121ea3c8d0de7d6dba9c11ac5 | |
parent | 35e1e720ca84a92c5c8fa92f26a50bb088a4bcb4 (diff) | |
download | Make-0cb6da8778659926553487e8751f6685be5a79af.tar.xz |
tools.pas: testeObBefehlLokal respect env
-rw-r--r-- | tools.pas | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -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; |