[NTG-context] Changes for setuptex

Cecil Westerhof cldwesterhof at gmail.com
Tue Mar 15 10:50:27 CET 2011

To make the shell script setuptex more robust I would add at the beginning:
set -o errexit
set -o nounset

function isVarSet() {
  if [[ ${#} -ne 1 ]] ; then

  declare -p ${1} &>/dev/null

And use:
    if  ! isVarSet PS1  ; then
instead of:
    if [ "x$PS1" != "x" ] ; then

I use in my script that calls setuptex
set -o errexit
set -o nounset

and that breaks the script. With my change there is no problem.

Cecil Westerhof
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20110315/432807a6/attachment.html>

More information about the ntg-context mailing list