#! /bin/sh # $Id$ # $URL$ # # This is a UvT specific testinstaller. Be aware that this might no apply to your situation! # Run this script from the directory where it is located. # # This scripts installs the merescoserver in the directory $HOME/server or, if this directory # already exists, into a temporary directory. You might want to remove a previouis $HOME/server # directory before the installation. # 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/oai cp share/doc/bzv/example/*.c* etc/bzv/ cp share/doc/bzv/example/oai/*.c* etc/bzv/oai/ sed -e "s/0$/$port/; s/admin@example.com/$USER@uvt.nl/" share/doc/bzv/example/system.cfg > etc/bzv/system.cfg mkdir -p etc/bzv/templates cp share/doc/bzv/example/templates/* etc/bzv/templates mkdir -p var/bzv/inbox/new mkdir -p var/bzv/inbox/cur mkdir -p var/bzv/oai/database mkdir -p var/bzv/log 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."