#!/bin/bash temp=$(mktemp -d) svn_base_uri="svn://cvs.magellan-linux.de/alx/alx-src" svn_module="alxconf" rev_keyword="${svn_module}" branch="_20060908" # stick on 20060908 branch tarball_prefix="alxconfig-ng" destination="root@cvs.magellan-linux.de:/var/www/htdocs/magellan/magellan-dev/sources/${tarball_prefix}/" latest_revision=$(svn ls --verbose ${svn_base_uri}/tags | grep ${rev_keyword}${branch} | sort -nr | sed -e 's:/::' | awk '{ print $6; exit; }') latest_version=$(echo ${latest_revision} | sed -e "s:${rev_keyword}_::" -e 's:_:-r:g') echo -n "building tarball for ${latest_version}... " cd ${temp} svn checkout ${svn_base_uri}/tags/${latest_revision} ${svn_module} # fix some import issues if [[ -d ${temp}/${svn_module}/alxconfig-ng ]] then mv ${temp}/${svn_module}/alxconfig-ng/* ${temp}/${svn_module} rm -rf ${temp}/${svn_module}/alxconfig-ng fi mv ${temp}/${svn_module} ${tarball_prefix}-${latest_version} rm ./${tarball_prefix}-${latest_version}/make-tarball.sh 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