#!/bin/bash export LC_ALL=C temp=$(mktemp -d) svn_base_uri="svn://cvs.magellan-linux.de/mcore/mcore-src/trunk/mcore-tools" svn_module="mcore-tools" tarball_prefix="${svn_module}" destination="root@cvs.magellan-linux.de:/var/www/htdocs/magellan/magellan-dev/sources/${svn_module}/" echo -n "building latest tarball for ${tarball_prefix}... " cd ${temp} svn checkout ${svn_base_uri} ${svn_module} latest_version="0.1_svn$(svn info ${svn_module} | grep Revision | sed 's:.*\:\ \(.*\):\1:')" mv ${temp}/${svn_module} ${tarball_prefix}-${latest_version} find ./${tarball_prefix}-${latest_version} -name .svn | xargs rm -r find ./${tarball_prefix}-${latest_version} -name .svnignore | 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