Skip to content

Commit

Permalink
Use lua init script
Browse files Browse the repository at this point in the history
Two -cnf-lines do not work. Add a lua init script instead, which sets shell restricted and the git command.
  • Loading branch information
MacLotsen committed Apr 6, 2024
1 parent 23fc77d commit f38f126
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ CONTRIBUTION = gitinfo-lua
VERSION = $(shell git describe --tags --always)
FILE = ${CONTRIBUTION}-${VERSION}.tar.gz
MANUAL = doc/${CONTRIBUTION}
CNF_LINE = -cnf-line TEXMFHOME={${CURDIR},$(shell kpsewhich --var-value TEXMFHOME)} -cnf-line shell_escape_commands=git
COMPILER = lualatex --shell-restricted --interaction=nonstopmode $(CNF_LINE)
CNF_LINE = -cnf-line TEXMFHOME={${CURDIR},$(shell kpsewhich --var-value TEXMFHOME)}
COMPILER = lualatex --lua=../scripts/gitinfo-lua-init.lua --interaction=nonstopmode $(CNF_LINE)
RM = rm
ifeq ($(OS),Windows_NT)
RM = del
Expand Down
5 changes: 5 additions & 0 deletions scripts/gitinfo-lua-init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

texconfig = texconfig or require('texconfig')

texconfig.shell_escape = 'p'
texconfig.shell_escape_commands = 'git'

0 comments on commit f38f126

Please sign in to comment.