#! /bin/sh set -e # $Id$ # $URL$ # # This script checks out a fresh SVN repositorytree from the SVN repository defined in the envvar: 'repository'. # The tree resides on a temporary location. A pythonpackage is build from it and the resulting .tar.gz file is # saved on a temporary location. The tree, no longer needed is then removed. # The .tar.gz file can now be copied and extracted onto a targetmachine where 'installTestversion' will # install the package. repository=https://svn.non-gnu.uvt.nl/uvt-dev/trunk/sources/meresco/bzv # show the current status svn -u st tmp=$(mktemp -d) trap 'rm -rf -- "$tmp"' EXIT cd $tmp svn export $repository bzv cd bzv ls -lh cp -a setup.py setup.py.org sed -e "s/version = 'SVN'/version = 'test-$USER'"/ setup.py.org > setup.py newver=$(sed -rn "s/.*version = '([^']*)'.*/\1/p" setup.py) echo "Generating version $newver" ./setup.py sdist file=bzv-test-$USER.tar.gz ln -f dist/$file /tmp echo "File placed at /tmp/$file"