summaryrefslogtreecommitdiff
path: root/netzbon
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-03-14 12:13:30 +0100
committerFlorian Dold <florian@dold.me>2023-03-14 12:13:30 +0100
commitc77865d1860795c78e3e689dc20c8a4bae0cb4f0 (patch)
treeac17cfc8e8cd53e07d5717f6afbc9d2cc90c7535 /netzbon
parent22843b2b3a61ba31ac2bb74fde23812ec6344215 (diff)
downloaddeployment-c77865d1860795c78e3e689dc20c8a4bae0cb4f0.tar.gz
deployment-c77865d1860795c78e3e689dc20c8a4bae0cb4f0.tar.bz2
deployment-c77865d1860795c78e3e689dc20c8a4bae0cb4f0.zip
netzbon: currency length check
Diffstat (limited to 'netzbon')
-rwxr-xr-xnetzbon/main.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/netzbon/main.sh b/netzbon/main.sh
index 5848915..52f5f67 100755
--- a/netzbon/main.sh
+++ b/netzbon/main.sh
@@ -21,13 +21,21 @@ source config/internal.conf
# Ask questions to user
# START USER INTERACTION
-echo "TALER: Welcome to the GNU Taler Debian setup!"
+say "Welcome to the GNU Taler Debian setup!"
+say ""
+say "All configuration values asked during the setup script"
+say "can be changed in config/user.conf"
if test -z "${CURRENCY:-}"
then
read -p "Enter the name of the currency (e.g. 'EUR'): " CURRENCY
# convert to all-caps
CURRENCY=`echo ${CURRENCY} | tr a-z A-Z`
+ # libeufin currenly doesn't like currency names less than 3 letters.
+ if [[ ${#CURRENCY} -lt 3 || ${#CURRENCY} -gt 11 ]]; then
+ say "Currency name must be between 3 and 10 letters"
+ exit 1
+ fi
echo "CURRENCY=${CURRENCY}" >> config/user.conf
fi
if test -z "${BANK_NAME:-}"