#!/bin/bash # Bootstrap the Taler setup for the user account that # is currently logged in. # Generates a setup for a single user, # including a postgresql DB. set -eu ENVNAME=$USER BRANCH=master CURRENCY=$(echo "KUDOS-$USER" | cut -c 1-11) PGBINDIR=$(pg_config --bindir) cd $HOME if ! test -d $HOME/gnunet; then git clone git://git.gnunet.org/gnunet.git fi if ! test -d $HOME/libmicrohttpd; then git clone git://git.gnunet.org/libmicrohttpd.git fi for component in twister bank merchant gnurl landing exchange donations blog deployment survey auditor backoffice ; do if ! test -d $HOME/$component; then git clone git://git.taler.net/$component.git fi done for component in twister bank merchant landing exchange donations blog survey auditor backoffice ; do echo "Checking out $component to $BRANCH" git -C $HOME/$component checkout $BRANCH done if ! test -d $HOME/talerdb; then $PGBINDIR/initdb -D talerdb -U $USER fi mkdir -p $HOME/sockets $PGBINDIR/postgres --single -D ~/talerdb -k $HOME/sockets -h "" postgres \ >/dev/null <<< "create database taler" $PGBINDIR/postgres --single -D ~/talerdb -k $HOME/sockets -h "" postgres \ >/dev/null <<< "create database talercheck" cat >$HOME/activate <