#! /bin/sh # $Id$ # $URL$ # # This is a UvT specific testinstaller. Be aware that this might no apply to your situation! set -e target=$HOME/server if [ -e $target ] then new=$(mktemp -d) echo "$target already exists, using temporary location $new" >&2 target=$new fi ./setup.py install --home=$target cd $target case $USER in anton) port=1 ;; fvos) port=2 ;; haast) port=3 ;; place) port=4 ;; hvddool) port=5 ;; wsl) port=6 ;; *) echo "\$USER=$USER is not a recognized user, sorry" >&2 exit ;; esac mkdir -p etc/bzv cp share/doc/bzv/example/* etc/bzv/ sed -e "s/0$/$port/; s/admin@example.com/$USER@uvt.nl/" share/doc/bzv/example/bzv.cfg > etc/bzv/bzv.cfg mkdir -p var/bzv/inbox mkdir -p var/bzv/done if [ ! -e ~/var/database ] then echo "This script assumes you have a database in ~/var/database" >&2 echo "Create one if necessary" >&2 fi ln -s ~/var/database var/bzv/ echo "Installation to $target complete."