summaryrefslogtreecommitdiff
path: root/bin/taler-deployment-config-generate
blob: 52c7f464b59e341f5345a0a04edcd68725d7797d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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"