[med-svn] r5208 - trunk/packages/ensembl/ensembl/57/debian
Steffen Möller
moeller at alioth.debian.org
Sat Sep 4 12:09:15 UTC 2010
Author: moeller
Date: 2010-09-04 12:09:12 +0000 (Sat, 04 Sep 2010)
New Revision: 5208
Modified:
trunk/packages/ensembl/ensembl/57/debian/prepare_ensembl_source_packages.sh
Log:
Fixed download script.
Modified: trunk/packages/ensembl/ensembl/57/debian/prepare_ensembl_source_packages.sh
===================================================================
--- trunk/packages/ensembl/ensembl/57/debian/prepare_ensembl_source_packages.sh 2010-08-31 22:10:44 UTC (rev 5207)
+++ trunk/packages/ensembl/ensembl/57/debian/prepare_ensembl_source_packages.sh 2010-09-04 12:09:12 UTC (rev 5208)
@@ -2,15 +2,32 @@
set -e
+startdir=`pwd`
+destdir=.
+
+
+if [ -d debian ]; then
+ echo "Found debian directory, retrieving Ensembl version from debian/changelog"
+ ensemblversion=`dpkg-parsechangelog | grep ^Version | head -1 | cut -f2 -d\ | cut -f1 -d-`
+ destdir=..
+fi
+
+
+
# All libraries must be of the same version - update them all or none
if [ -z "$ensemblversion" ]; then
ensemblversion=57
fi
-if [ -d "$ensemblversion" ] ; then cd $ensemblversion; else
- echo "No dir $ensemblversion"
- exit;
+downloaddir=$destdir/$ensemblversion.$$
+
+
+echo "Will download to directory '$downloaddir'."
+
+if [ ! -d "$downloaddir" ] ; then
+ mkdir "$downloaddir"
fi
+cd "$downloaddir"
export CVSROOT=":pserver:cvsuser at cvs.sanger.ac.uk:/cvsroot/ensembl"
@@ -35,12 +52,28 @@
echo
done
+
echo
echo " Removing CVS directories."
echo
+# still in $downloaddir
find . -name CVS -a -type d | xargs -r rm -rf
+cd "$startdir"
+
+echo " Renaming for looking nice to ensembl-$ensemblversion"
+if [ -d "ensembl-$ensemblversion" ]; then
+ echo "Moving existing folder 'ensembl-$ensemblversion' to 'ensembl-$ensemblversion.old'"
+ rm -rf "ensembl-$ensemblversion.old"
+ mv "ensembl-$ensemblversion" "ensembl-$ensemblversion.old"
+fi
+mv "$downloaddir" "$destdir/ensembl-$ensemblversion"
+cd "$destdir"
+GZIP=--best tar czvf ensembl_${ensemblversion}.orig.tar.gz ensembl-$ensemblversion
+
echo
echo "Success."
echo
+echo "Left downloaded folder '$destdir/ensembl-$ensemblversion' intact."
+echo
More information about the debian-med-commit
mailing list