#!/bin/bash

repo='test.fossil'
admin='tester'
# clean up:
rm -rf fossil proj  "$repo"

# create the infrastructure:
mkdir fossil
mkdir proj

# create the fossil
fossil new --admin-user "$admin" "$repo"
# run the server:
fossil server "$repo" &

# clone it
(
	cd fossil
	fossil clone "http://$admin@localhost:8080/"  "$repo.clone"
)

# update it
(
	cd proj
	fossil open "../fossil/$repo.clone"
	fossil upd
)

# good-by server:
kill %1
