#!/bin/bash export LC_ALL=C temp=$(mktemp -d) cvs_base_uri=":pserver:anonymous@cvs.freedesktop.org:/cvs/portland" cvs_module="portland/xdg-utils" tarball_prefix="${cvs_module##*/}" destination="root@cvs.magellan-linux.de:/var/www/htdocs/magellan/magellan-dev/sources/${cvs_module##*/}/" echo -n "building latest tarball for ${tarball_prefix}... " cd ${temp} cvs -z3 -d ${cvs_base_uri} checkout -P ${cvs_module} latest_version="1.0.2_$(date +%Y%m%d)" mv -v ${temp}/${cvs_module} ${tarball_prefix}-${latest_version} find ./${tarball_prefix}-${latest_version} -name CVS | xargs rm -r find ./${tarball_prefix}-${latest_version} -name .cvsignore | xargs rm tar cvjf ${tarball_prefix}-${latest_version}.tar.bz2 ./${tarball_prefix}-${latest_version} scp ${tarball_prefix}-${latest_version}.tar.bz2 ${destination} if [[ -d ${temp} ]] then rm -rf ${temp} fi exit 0