diff options
author | Karl Berry <karl@freefriends.org> | 2019-07-15 20:48:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-07-15 20:48:56 +0000 |
commit | 4450dac922ac3fa8bc77879f7b849b6de9423624 (patch) | |
tree | e1f8373069d5162f5a7f56fe7291e223974956ec /Master/texmf-dist/scripts/arara | |
parent | 7a4db7bf8cd94e48795dc8fdf633969f194dc121 (diff) |
arara (15jul19)
git-svn-id: svn://tug.org/texlive/trunk@51646 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/arara')
-rw-r--r-- | Master/texmf-dist/scripts/arara/arara.jar | bin | 5119284 -> 5119284 bytes | |||
-rwxr-xr-x | Master/texmf-dist/scripts/arara/arara.sh | 24 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/arara/rules/dvisvgm.yaml | 28 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/arara/rules/indent.yaml | 14 |
4 files changed, 57 insertions, 9 deletions
diff --git a/Master/texmf-dist/scripts/arara/arara.jar b/Master/texmf-dist/scripts/arara/arara.jar Binary files differindex 179c09f52b9..46c22ce0aa9 100644 --- a/Master/texmf-dist/scripts/arara/arara.jar +++ b/Master/texmf-dist/scripts/arara/arara.jar diff --git a/Master/texmf-dist/scripts/arara/arara.sh b/Master/texmf-dist/scripts/arara/arara.sh index 8f97643a72e..197228f4916 100755 --- a/Master/texmf-dist/scripts/arara/arara.sh +++ b/Master/texmf-dist/scripts/arara/arara.sh @@ -1,9 +1,17 @@ -#!/bin/bash -kernel=`uname -s` -if test "${kernel#*CYGWIN}" != "$kernel" -then - jarpath=`cygpath -w $(kpsewhich --progname=arara --format=texmfscripts arara.jar)` -else - jarpath=`kpsewhich --progname=arara --format=texmfscripts arara.jar` +#!/bin/sh +# Public domain. Originally written by Norbert Preining and Karl Berry, 2018. +# Note from Paulo: this script provides better Cygwin support than our original +# approach, so the team decided to use it as a proper wrapper for arara as well. + +scriptname=`basename "$0"` +jar="$scriptname.jar" +jarpath=`kpsewhich --progname="$scriptname" --format=texmfscripts "$jar"` + +kernel=`uname -s 2>/dev/null` +if echo "$kernel" | grep CYGWIN >/dev/null; then + CYGWIN_ROOT=`cygpath -w /` + export CYGWIN_ROOT + jarpath=`cygpath -w "$jarpath"` fi -java -jar "$jarpath" "$@" + +exec java -jar "$jarpath" "$@" diff --git a/Master/texmf-dist/scripts/arara/rules/dvisvgm.yaml b/Master/texmf-dist/scripts/arara/rules/dvisvgm.yaml new file mode 100644 index 00000000000..0b5377f29d0 --- /dev/null +++ b/Master/texmf-dist/scripts/arara/rules/dvisvgm.yaml @@ -0,0 +1,28 @@ +!config +# Arara, the cool TeX automation tool +# Copyright (c) 2018, Paulo Roberto Massa Cereda +# All rights reserved. +# +# This rule is part of arara. +identifier: dvisvgm +name: DVISVGM +authors: +- samcarter +commands: +- name: The dvisvgm program + command: > + @{ + base = getBasename(file).concat('.dvi'); + return getCommand('dvisvgm', base, options); + } +arguments: +- identifier: options + flag: > + @{ + if (isList(parameters.options)) { + return parameters.options; + } + else { + throwError('I was expecting a list of options.'); + } + } diff --git a/Master/texmf-dist/scripts/arara/rules/indent.yaml b/Master/texmf-dist/scripts/arara/rules/indent.yaml index 50aadea0be7..b1e182f0a76 100644 --- a/Master/texmf-dist/scripts/arara/rules/indent.yaml +++ b/Master/texmf-dist/scripts/arara/rules/indent.yaml @@ -15,7 +15,7 @@ commands: @{ return getCommand('latexindent', silent, trace, screenlog, settings, cruft, overwrite, output, file, modifylinebreaks, - options, logfile); + replacement, options, logfile); } arguments: - identifier: silent @@ -85,6 +85,18 @@ arguments: throwError('This key requires a local setting.'); } } +- identifier: replacement + flag: > + @{ + opts = [ 'full' : '-r', 'noverb' : '-rv', 'noindent' : '-rr' ]; + if (opts.keySet().contains(parameters.replacement)) { + return opts[parameters.replacement]; + } + else { + throwError('You provided an invalid value for replacement.'); + } + } + - identifier: options flag: > @{ |