[tex-live] Adding programs to shell_escape_commands

Br. Samuel Springuel rpspringuel at gmail.com
Wed May 11 04:50:19 CEST 2016


On 2016-05-10 9:42 PM, Norbert Preining wrote:
> That is a full fledged texmf.cnf file and thus *can* possible contain
> everything that is there in a normal texmf.cnf file.
 > ...
> What happens with a setting of shell_escape_commands in there?


Okay, so my starting idea is insufficient to the task (I had a sneaking 
suspicion, but thought it safer to ask than assume).  IIUC, I need to 
take the time to check for the file, examine the contents, and use 
substitution when necessary.  Here's my revision to do all that:

mkdir -p /usr/local/texlive/texmf-local/web2c
touch /usr/local/texlive/texmf-local/web2c/texmf.cnf
if grep -q "^shell_escape_commands =.*gregorio.*" 
/usr/local/texlive/texmf-local/web2c/texmf.cnf; then
     echo "gregorio is already in the shell_escape_commands"
     echo "doing nothing"
elif grep -q "^shell_escape_commands =" 
/usr/local/texlive/texmf-local/web2c/texmf.cnf; then
     sed -i.temp '/^shell_escape_commands =/ s/$/gregorio,/' 
/usr/local/texlive/texmf-local/web2c/texmf.cnf
     mktexlsr
else
     echo "" >> /usr/local/texlive/texmf-local/web2c/texmf.cnf
     echo "shell_escape_commands = `kpsewhich 
--var-value=shell_escape_commands`gregorio," >> 
/usr/local/texlive/texmf-local/web2c/texmf.cnf
     echo "" >> /usr/local/texlive/texmf-local/web2c/texmf.cnf
     mktexlsr
fi


Does anyone see any potential problems here?
-- 
✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ


More information about the tex-live mailing list