#!/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 # There MUST be a user with the same name # as the deployment basename to share data # between the blue/green deployment. set -eu usage() { ech "Usage:" echo "$0: DEPLOYMENT_BASENAME" } if [ -z ${1+x} ]; then usage exit 1 fi DEPLOYMENT_BASENAME=$1 BRANCH=master case $DEPLOYMENT_BASENAME in demo) BRANCH=stable ;; esac cd $HOME if ! test -d $HOME/gnunet; then svn checkout https://gnunet.org/svn/gnunet fi if ! test -d $HOME/libmicrohttpd; then svn checkout https://gnunet.org/svn/libmicrohttpd fi for component in bank merchant gnurl landing exchange merchant-frontends deployment; do if ! test -d $HOME/$component; then git clone /var/git/$component.git fi done for component in bank merchant landing exchange merchant-frontends; do echo "Checking out $component to $BRANCH" git -C $HOME/$component checkout $BRANCH done cat >$HOME/activate <