--- trunk/mage/make-tarball.sh 2008/01/01 16:42:14 647 +++ trunk/mage/make-tarball.sh 2009/01/31 16:22:41 795 @@ -1,28 +1,34 @@ #!/bin/bash temp=$(mktemp -d) -cvs_module="magellan-src/mage" -rev_keyword="mage" -tarball_prefix="mage" -destination="root@cvs.magellan-linux.de:/var/www/htdocs/magellan/magellan-dev/sources/mage/" +svn_base_uri="svn://cvs.magellan-linux.de/magellan-source" +svn_module="mage" +rev_keyword="${svn_module}" +tarball_prefix="${svn_module}" +destination="root@cvs.magellan-linux.de:/var/www/htdocs/magellan/magellan-dev/sources/${svn_module}/" -latest_revision=$(cvs status -v make-tarball.sh | grep -A1 "Existing Tags:" | sed -e 's/Existing Tags://' -e 's/ //g' -e '/^$/d' | /bin/awk '{ print $1; exit; }') +latest_revision=$(svn ls --verbose ${svn_base_uri}/tags | grep ${rev_keyword} | sort -n | sed -e 's:/::' | awk '{ print $6; exit; }') latest_version=$(echo ${latest_revision} | sed -e "s:${rev_keyword}-::" -e 's:_:.:g') echo -n "building tarball for ${latest_version}... " cd ${temp} -cvs -z3 -d :pserver:anonymous:@cvs.magellan-linux.de:/magellan-cvs checkout -P -r ${latest_revision} ${cvs_module} -mv ${temp}/${cvs_module} ${tarball_prefix}-${latest_version} +svn checkout ${svn_base_uri}/tags/${latest_revision} ${svn_module} +# fix some import issues +if [[ -d ${temp}/${svn_module}/${svn_module} ]] +then + mv ${temp}/${svn_module}/${svn_module}/* ${temp}/${svn_module} + rm -rf ${temp}/${svn_module}/${svn_module} +fi +mv ${temp}/${svn_module} ${tarball_prefix}-${latest_version} rm ./${tarball_prefix}-${latest_version}/make-tarball.sh -find ./${tarball_prefix}-${latest_version} -name CVS | xargs rm -r -find ./${tarball_prefix}-${latest_version} -name .cvsignore | xargs rm +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 - +# if [[ -d ${temp} ]] +# then +# rm -rf ${temp} +# fi +echo DEBUG:${temp} exit 0 -