summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-11-19 17:55:12 +0100
committerFlorian Dold <florian.dold@gmail.com>2016-11-19 17:55:12 +0100
commit86c652814ba2f314a8c6660b19388fd1855ffcc0 (patch)
treeabd0afcc9e5546e35acf47edd371da86c7131dbf /bin
parentdb48d6f718382d9ea40f0e9fd91ab025228b7922 (diff)
downloaddeployment-86c652814ba2f314a8c6660b19388fd1855ffcc0.tar.gz
deployment-86c652814ba2f314a8c6660b19388fd1855ffcc0.tar.bz2
deployment-86c652814ba2f314a8c6660b19388fd1855ffcc0.zip
conf gen
Diffstat (limited to 'bin')
-rwxr-xr-xbin/taler-deployment-config-generate29
-rwxr-xr-xbin/taler-deployment-config-sign6
2 files changed, 35 insertions, 0 deletions
diff --git a/bin/taler-deployment-config-generate b/bin/taler-deployment-config-generate
new file mode 100755
index 0000000..52c7f46
--- /dev/null
+++ b/bin/taler-deployment-config-generate
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+# (Re-)generate the taler configuration based on environment variables.
+# These variables are usually defined in ~/activate.
+# Some configuration files still need to be signed with taler-deployment-config-sign.
+
+set -eu
+
+base=$HOME
+
+export PATH="$base/deployment":$PATH
+
+if [[ -z ${TALER_CONFIG_ENV+x} ]];
+ echo "TALER_CONFIG_ENV not set"
+ exit 1
+fi
+
+if [[ -z ${TALER_CONFIG_CURRENCY+x} ]];
+ echo "TALER_CONFIG_CURRENCY not set"
+ exit 1
+fi
+
+exchange_pub=$(gnunet-ecc -p ~/shared-data/exchange/offline-keys/master.priv)
+
+~/deployment/config/generate-config \
+ --exchange-pub "$exchange_pub" \
+ --currency "$TALER_CONFIG_CURRENCY" \
+ --outdir ~/.config \
+ --envname "$TALER_CONFIG_ENV"
diff --git a/bin/taler-deployment-config-sign b/bin/taler-deployment-config-sign
new file mode 100755
index 0000000..bc3f222
--- /dev/null
+++ b/bin/taler-deployment-config-sign
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+base=$HOME
+
+export PATH="$base/deployment":$PATH
+