#!/bin/bash # $HeadURL$ $LastChangedRevision$ echo "configuring environment ..." export RDW2_DB_FILE=$(pwd)/var/rdw2.sqlite export RDW2_ETC_PREFIX=$(pwd)/etc export LABEL_TOOL_REROOT_FLAG=true export LABEL_TOOL_REROOT_DIR=$(pwd)/.label-tool-reroot echo "setting up support functions ..." list_sets() { echo "listing sets (expect $1) ..." rdw2 --list-sets } echo "initialising server ..." mkdir -p etc var echo 'rdw2_server_flag = True' > etc/rdw2.py rdw2 --list-sets > /dev/null echo "attempting to create a set using a non-existent schedule ..." rdw2 --no-update-cron --add-set oss biweekly list_sets none echo "creating a set ..." rdw2 --no-update-cron --add-set oss nightly list_sets one echo "attempting to delete a non-existent set ..." rdw2 --no-update-cron --del-set xxx list_sets one echo "deleting an existent set ..." rdw2 --no-update-cron --del-set oss list_sets none echo "all done"