commit ff0d2f1de86df19e342923dc27b84673305ca808 parent f7a6112e0b239c7faf0ab844572769799fdc88a2 Author: Christian Grothoff <christian@grothoff.org> Date: Sat, 7 Feb 2026 18:11:20 +0100 fix #11015 Diffstat:
| M | contrib/taler-terms-generator | | | 19 | ++++++++++++++++--- |
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/contrib/taler-terms-generator b/contrib/taler-terms-generator @@ -26,7 +26,12 @@ set -eu # defaults AUTHOR="GNU Taler team" INPUT="exchange-tos-v0" -OUTPUT=${TALER_EXCHANGE_TERMS_DIR:-$(taler-exchange-config -s "EXCHANGE" -o "TERMS_DIR" -f)} +if taler-exchange-config --version >/dev/null 2>&1 +then + OUTPUT=${TALER_EXCHANGE_TERMS_DIR:-$(taler-exchange-config -s "EXCHANGE" -o "TERMS_DIR" -f)} +else + OUTPUT=${TALER_EXCHANGE_TERMS_DIR:-} +fi PAPER="a4" COPYRIGHT="2014-2025 Taler Systems SA (GPLv3+ or GFDL 1.3+)" @@ -89,13 +94,21 @@ then exit 1 fi -if ! which pandoc >/dev/null; then +if [ -z "${OUTPUT}" ] +then + echo "Error: '-o' option not given and autodetection failed." 1>&2 + exit 1 +fi + +if ! which pandoc >/dev/null; +then echo "Command 'pandoc' not found, but required. Please install pandoc." 1>&2 exit 1 fi # FIXME: do we actually need 'gs'? -if ! which gs >/dev/null; then +if ! which gs >/dev/null; +then echo "Command 'gs' not found, but required. Please install ghostscript." 1>&2 exit 1 fi