#!/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) 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 bank merchant gnurl landing exchange donations blog deployment survey auditor backoffice ; do if ! test -d $HOME/$component; then git clone /var/git/$component.git fi done for component in 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 /usr/lib/postgresql/9.5/bin/initdb -D talerdb -U $USER fi mkdir -p $HOME/sockets /usr/lib/postgresql/9.5/bin/postgres --single -D ~/talerdb -k $HOME/sockets -h "" postgres \ >/dev/null <<< "create database taler" /usr/lib/postgresql/9.5/bin/postgres --single -D ~/talerdb -k $HOME/sockets -h "" postgres \ >/dev/null <<< "create database talercheck" cat >$HOME/activate <