Explorar el Código

Move the latexmk timing command into a configurable `latexmkCommandPrefix`.

By default, no timing information will be taken.
On Linux with GNU user land, this value should be configured to `["/usr/bin/time", "-v"]`.
On Mac, gnu-time should be installed and configured to `["/usr/local/bin/gtime", "-v"]`.
Shane Kilkelly hace 10 años
padre
commit
638ac52e40

+ 3 - 1
services/clsi/app/coffee/LatexRunner.coffee

@@ -49,7 +49,9 @@ module.exports = LatexRunner =
 			timings["sys-time"] = stderr?.match(/System time.*: (\d+.\d+)/m)?[1] or 0
 			callback error, output, stats, timings
 
-	_latexmkBaseCommand: ["/usr/bin/time", "-v", "latexmk", "-cd", "-f", "-jobname=output", "-auxdir=$COMPILE_DIR", "-outdir=$COMPILE_DIR"]
+	_latexmkBaseCommand: (Settings?.clsi?.latexmkCommandPrefix || []).concat(
+			["latexmk", "-cd", "-f", "-jobname=output", "-auxdir=$COMPILE_DIR", "-outdir=$COMPILE_DIR"]
+		)
 
 	_pdflatexCommand: (mainFile) ->
 		LatexRunner._latexmkBaseCommand.concat [

+ 3 - 0
services/clsi/config/settings.defaults.coffee

@@ -28,6 +28,9 @@ module.exports =
 	# 		modem:
 	# 			socketPath: false
 	# 		user: "tex"
+	# 		latexmkCommandPrefix: []
+	# 		# latexmkCommandPrefix: ["/usr/bin/time", "-v"]         # on Linux
+	# 		# latexmkCommandPrefix: ["/usr/local/bin/gtime", "-v"]  # on Mac OSX, installed with `brew install gnu-time`
 
 	internal:
 		clsi: