gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: -update tos generator logic, fi


From: gnunet
Subject: [taler-exchange] branch master updated: -update tos generator logic, fix bug
Date: Fri, 11 Aug 2023 21:17:27 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 0208fc5e -update tos generator logic, fix bug
0208fc5e is described below

commit 0208fc5ef550a94c7a4a09fde0242b40996f804f
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Aug 11 21:17:23 2023 +0200

    -update tos generator logic, fix bug
---
 contrib/taler-exchange-dbconfig  |  1 +
 contrib/taler-terms-generator.in | 31 ++++++++++++++++---------------
 2 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/contrib/taler-exchange-dbconfig b/contrib/taler-exchange-dbconfig
index 4be0fef7..3d85a076 100755
--- a/contrib/taler-exchange-dbconfig
+++ b/contrib/taler-exchange-dbconfig
@@ -31,6 +31,7 @@ while getopts ':hn:rsu:' OPTION; do
         h)
             echo 'Supported options:'
             echo "  -c FILENAME  -- write configuration to FILENAME (default: 
$CFGFILE)"
+            echo "  -h           -- print this help text"
             echo "  -n NAME      -- user NAME for database name (default: 
$DBNAME)"
             echo "  -r           -- reset database (dangerous)"
             echo "  -s           -- skip database initialization"
diff --git a/contrib/taler-terms-generator.in b/contrib/taler-terms-generator.in
index 11f964f7..d328c770 100755
--- a/contrib/taler-terms-generator.in
+++ b/contrib/taler-terms-generator.in
@@ -129,7 +129,7 @@ while getopts ':a:C:hi:l:o:p:t:' OPTION; do
                 a4|letter)
                 ;;
                 *)
-                    echo "Error: Paper format '$PAPER' invalid (use 'a4' or 
'letter')"
+                    echo "Error: Paper format '$PAPER' invalid (use 'a4' or 
'letter')" 1>&2
                     exit 1
                     ;;
             esac
@@ -138,21 +138,22 @@ while getopts ':a:C:hi:l:o:p:t:' OPTION; do
             TITLE="$OPTARG"
             ;;
         ?)
-        exit_fail "Unrecognized command line option"
+        echo "Unrecognized command line option" 1>&2
+        exit 1
         ;;
     esac
 done
 
 if ! which sphinx-build > /dev/null
 then
-    echo "Command 'sphinx-build' not found, but required. Please install 
sphinx."
+    echo "Command 'sphinx-build' not found, but required. Please install 
sphinx." 1>&2
     exit 1
 fi
 
 BUILDDIR=$(mktemp -d /tmp/taler-terms-XXXXXX)
 if [ ! -f "${VERSION}.rst" ]
 then
-    echo "Error: File '${VERSION}.rst' not found. Please check '-i' option."
+    echo "Error: File '${VERSION}.rst' not found. Please check '-i' option." 
1>&2
     exit 1
 fi
 
@@ -161,17 +162,17 @@ cp "${VERSION}.rst" "${BUILDDIR}/"
 if [ -z ${TITLE+x} ]
 then
     TITLE=$(head -n1 "${VERSION}.rst")
-    echo "Title automatically set to '$TITLE'"
+    echo "Title automatically set to '$TITLE'" 1>&2
 fi
 
 if [ -n "${ADD_LANGUAGE+x}" ]
 then
     if echo "${ADD_LANGUAGE}" | grep -e '..' > /dev/null
     then
-        echo "Error: Invalid language '${ADD_LANGUAGE}'. Two characters (en, 
de, fr, ...) expected."
+        echo "Error: Invalid language '${ADD_LANGUAGE}'. Two characters (en, 
de, fr, ...) expected." 1>&2
         exit 1
     fi
-    echo "Adding language files for translations to '${ADD_LANGUAGE}'"
+    echo "Adding language files for translations to '${ADD_LANGUAGE}'" 1>&2
     make_config "${ADD_LANGUAGE}"
     sphinx-build \
         -b gettext \
@@ -194,21 +195,21 @@ then
            "${PWD}/locale/${ADD_LANGUAGE}/LC_MESSAGES/${VERSION}.po"
     fi
     rm "${PWD}/locale/${ADD_LANGUAGE}/LC_MESSAGES/${VERSION}.pot"
-    echo "Done"
+    echo "Done" 1>&2
     exit 0
 fi
 
 for d in en $(ls -d locale/?? 2> /dev/null || true)
 do
     LANGUAGE=$(basename "$d")
-    echo "Generating files at '$OUTPUT' for ETag '$VERSION' and language 
'${LANGUAGE}' in '${BUILDDIR}':"
+    echo "Generating files at '$OUTPUT' for ETag '$VERSION' and language 
'${LANGUAGE}' in '${BUILDDIR}':" 1>&2
 
     make_config "$LANGUAGE"
     mkdir -p "${OUTPUT}/${LANGUAGE}/"
 
     LBUILD="sphinx-build -D language=${LANGUAGE} -d ${BUILDDIR}/.doctrees"
 
-    echo "$VERSION XML ($LANGUAGE)..."
+    echo "$VERSION XML ($LANGUAGE)..." 1>&2
 # shellcheck disable=SC2090
     $LBUILD \
         -b xml \
@@ -217,7 +218,7 @@ do
         &> "${BUILDDIR}/xml-sphinx.log"
     mv "${BUILDDIR}/xml/${VERSION}.xml" "${OUTPUT}/${LANGUAGE}/${VERSION}.xml"
 
-    echo "$VERSION TXT ($LANGUAGE)..."
+    echo "$VERSION TXT ($LANGUAGE)..." 1>&2
 # shellcheck disable=SC2090
     $LBUILD \
         -b text \
@@ -227,7 +228,7 @@ do
     mv "${BUILDDIR}/txt/${VERSION}.txt" "${OUTPUT}/${LANGUAGE}/${VERSION}.txt"
     cp "${OUTPUT}/${LANGUAGE}/${VERSION}.txt" 
"${OUTPUT}/${LANGUAGE}/${VERSION}.md"
 
-    echo "$VERSION HTML ($LANGUAGE)..."
+    echo "$VERSION HTML ($LANGUAGE)..." 1>&2
 # shellcheck disable=SC2090
     $LBUILD \
         -b html \
@@ -238,7 +239,7 @@ do
         -o "${OUTPUT}/${LANGUAGE}/${VERSION}.html" \
         "${BUILDDIR}/html/${VERSION}.html"
 
-    echo "$VERSION EPUB ($LANGUAGE)..."
+    echo "$VERSION EPUB ($LANGUAGE)..." 1>&2
 # shellcheck disable=SC2090
     $LBUILD \
         -b epub \
@@ -247,7 +248,7 @@ do
         &> "$BUILDDIR/epub-sphinx.log"
     mv "${BUILDDIR}/epub/${VERSION}.epub" 
"${OUTPUT}/${LANGUAGE}/${VERSION}.epub"
 
-    echo "$VERSION PDF ($LANGUAGE)..."
+    echo "$VERSION PDF ($LANGUAGE)..." 1>&2
 # shellcheck disable=SC2090
     $LBUILD \
         -b latex \
@@ -262,5 +263,5 @@ do
     mv "${BUILDDIR}/pdf/${VERSION}.pdf" "${OUTPUT}/${LANGUAGE}/${VERSION}.pdf"
 done
 
-echo "Done"
+echo "Done" 1>&2
 exit 0

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]