#!/bin/bash # Bootstrap the Taler setup for the user account that # is currently logged in. # The setup generated by this script is suitable for # blue-green deployments, where two users run # identical environments, and traffic can be switched # between them. # To create a demo setup, run # demo-blue$ ~/deployment/bootstrap-bluegreen demo # demo-green$ ~/deployment/bootstrap-bluegreen demo # NOTE: ENVNAME is also the name of the user who keeps # shared data in its home directory, so it must exist! # For demo/test ENVNAMEs, see {demo,test}.sh set -eu usage() { echo "Usage: $0 ENVNAME, test or demo" } if [ -z ${1+x} ]; then usage exit 1 fi ENVNAME=$1 source ~/envconfig case $ENVNAME in test) CURRENCY=TESTKUDOS ;; demo) CURRENCY=KUDOS ;; *) echo Invalid envname, only 'test' and 'demo'. exit 1 ;; esac cd $HOME if ! test -d $HOME/gnunet; then git clone git://gnunet.org/gnunet.git fi if ! test -d $HOME/libmicrohttpd; then git clone git://gnunet.org/libmicrohttpd.git fi for component in exchange bank gnurl; do if ! test -d $HOME/$component; then git clone git://git.taler.net/$component fi done cat >$HOME/activate <