[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-deployment] branch master updated: update scripts for more unifor
From: |
gnunet |
Subject: |
[taler-deployment] branch master updated: update scripts for more uniform usage |
Date: |
Tue, 13 Aug 2024 13:20:30 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository deployment.
The following commit(s) were added to refs/heads/master by this push:
new 532a652 update scripts for more uniform usage
532a652 is described below
commit 532a652c72263619c5c796f78a22683ef017165a
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Tue Aug 13 13:20:23 2024 +0200
update scripts for more uniform usage
---
netzbon/README | 8 ++++++++
netzbon/generate-letter.sh | 7 +++----
netzbon/generate-qr.sh | 7 +++----
netzbon/setup-merchants.sh | 8 ++++----
netzbon/test.json | 10 ++++++++++
5 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/netzbon/README b/netzbon/README
new file mode 100644
index 0000000..15f017b
--- /dev/null
+++ b/netzbon/README
@@ -0,0 +1,8 @@
+You need to install
+
+- jq
+- pdflatex (2023)
+- python3-jinja2
+- pdftk
+
+before using the scripts in this directory.
diff --git a/netzbon/generate-letter.sh b/netzbon/generate-letter.sh
index 272463c..6708c67 100755
--- a/netzbon/generate-letter.sh
+++ b/netzbon/generate-letter.sh
@@ -6,15 +6,14 @@
#
# You must export
#
-# export BASE_URL=https://e.netzbon-basel.ch/
+# export BASE_DOMAIN=https://e.netzbon-basel.ch/
#
# before running this script!
#
set -eu
LENGTH=$(jq length < $1)
-echo "Generating $LENGTH letters for ${BASE_URL}"
-DOMAIN=$( echo "${BASE_URL}" | sed -e "s/https:\/\///" | sed -e "s/\/$//")
+echo "Generating $LENGTH letters for ${BASE_DOMAIN}"
mkdir -p export
mkdir -p tmp
@@ -24,7 +23,7 @@ do
INDEX=$(expr $n - 1 || true)
ID=$(jq -r .[$INDEX].id < $1)
- jq ".[$INDEX]" < $1 | jq '.domain="'"${DOMAIN}"'"' > "tmp/${ID}.json"
+ jq ".[$INDEX]" < $1 | jq '.domain="'"${BASE_DOMAIN}"'"' > "tmp/${ID}.json"
cd tmp
../render.py "${ID}.json" < ../template_de.tex.j2 > "${ID}.tex"
pdflatex "${ID}.tex" < /dev/null &> /dev/null || true
diff --git a/netzbon/generate-qr.sh b/netzbon/generate-qr.sh
index e5c01c6..184859b 100755
--- a/netzbon/generate-qr.sh
+++ b/netzbon/generate-qr.sh
@@ -6,15 +6,14 @@
#
# You must export
#
-# export BASE_URL=https://e.netzbon-basel.ch/
+# export BASE_DOMAIN=e.netzbon-basel.ch
#
# before running this script!
#
set -eu
LENGTH=$(jq length < $1)
-echo "Generating $LENGTH QR codes for ${BASE_URL}"
-DOMAIN=$( echo "${BASE_URL}" | sed -e "s/https:\/\///" | sed -e "s/\/$//")
+echo "Generating $LENGTH QR codes for ${BASE_DOMAIN}"
mkdir -p qre
mkdir -p tmp
@@ -24,7 +23,7 @@ do
INDEX=$(expr $n - 1 || true)
ID=$(jq -r .[$INDEX].id < $1)
- jq ".[$INDEX]" < $1 | jq '.domain="'"${DOMAIN}"'"' > "tmp/${ID}.json"
+ jq ".[$INDEX]" < $1 | jq '.domain="'"${BASE_DOMAIN}"'"' > "tmp/${ID}.json"
cd tmp
../render.py "${ID}.json" < ../qr.tex.j2 > "${ID}.tex"
pdflatex "${ID}.tex" < /dev/null &> /dev/null || true
diff --git a/netzbon/setup-merchants.sh b/netzbon/setup-merchants.sh
index 3e647b6..c877ba5 100755
--- a/netzbon/setup-merchants.sh
+++ b/netzbon/setup-merchants.sh
@@ -3,7 +3,7 @@
#
# You must export
#
-# export BASE_URL=e.netzbon-basel.ch
+# export BASE_DOMAIN=e.netzbon-basel.ch
# export MERCHANT_TOKEN=secret-token:...
# export BANK_ADMIN_PASSWORD=password
#
@@ -18,7 +18,7 @@
set -eu
LENGTH=$(jq length < $1)
-echo "Setting up $LENGTH merchants at ${BASE_URL}"
+echo "Setting up $LENGTH merchants at ${BASE_DOMAIN}"
for n in $(seq 1 $LENGTH)
do
@@ -28,8 +28,8 @@ do
ID=$(jq -r .[$INDEX].id < $1)
PW=$(jq -r .[$INDEX].pass < $1)
taler-harness deployment provision-bank-and-merchant \
- "https://backend.${BASE_URL}" \
- "https://bank.${BASE_URL}" \
+ "https://backend.${BASE_DOMAIN}" \
+ "https://bank.${BASE_DOMAIN}" \
"--merchant-management-token=${MERCHANT_TOKEN}" \
"--bank-admin-password=${BANK_ADMIN_PASSWORD}" \
"--id=${ID}" \
diff --git a/netzbon/test.json b/netzbon/test.json
index 9a47fe6..5f43ebe 100644
--- a/netzbon/test.json
+++ b/netzbon/test.json
@@ -3,5 +3,15 @@
"name": "Test shop",
"id": "test",
"pass": "password"
+ },
+ {
+ "name": "Test shop",
+ "id": "test2",
+ "pass": "password"
+ },
+ {
+ "name": "Test shop",
+ "id": "test3",
+ "pass": "password"
}
]
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-deployment] branch master updated: update scripts for more uniform usage,
gnunet <=