[Debian-astro-commits] [cpl-plugin-template] 23/76: Add option to remove huge test data sets

Ole Streicher olebole at moszumanska.debian.org
Wed Sep 23 09:59:48 UTC 2015


This is an automated email from the git hooks/post-receive script.

olebole pushed a commit to branch debian
in repository cpl-plugin-template.

commit 6092758c6dcb18bd813ed93359991deca86530ba
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Wed Oct 16 13:03:39 2013 +0200

    Add option to remove huge test data sets
---
 debian/repackage.sh | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/debian/repackage.sh b/debian/repackage.sh
index 2254c06..5e60aa4 100755
--- a/debian/repackage.sh
+++ b/debian/repackage.sh
@@ -21,13 +21,27 @@ VERSION=$2
 #INCLUDE_CALIB="no"
 INCLUDE_CALIB="yes"
 
+# Include test data?
+# If not, the test (fits) data are removed from the source package.
+# In this case, also the tests need to be adjusted.
+#INCLUDE_TEST_DATA="no"
+INCLUDE_TEST_DATA="yes"
+
 BASEDIR=$(dirname $3)
 FILENAME=${BASEDIR}/${PIPELINE}-kit-${VERSION}.tar.gz
 tar xf ${FILENAME} -C ${BASEDIR}
 rm -f ${BASEDIR}/${DEBIAN_PACKAGE}_${VERSION}.orig*.tar.gz ${FILENAME}
 
-mv ${BASEDIR}/${PIPELINE}-kit-${VERSION}/${PIPELINE}-${VERSION}.tar.gz \
-   ${BASEDIR}/${DEBIAN_PACKAGE}_${VERSION}.orig.tar.gz
+if [ $INCLUDE_TEST_DATA = "yes" ] ; then
+  mv ${BASEDIR}/${PIPELINE}-kit-${VERSION}/${PIPELINE}-${VERSION}.tar.gz \
+     ${BASEDIR}/${DEBIAN_PACKAGE}_${VERSION}.orig.tar.gz
+else
+  tar xf ${BASEDIR}/${PIPELINE}-kit-${VERSION}/${PIPELINE}-${VERSION}.tar.gz\
+      -C ${BASEDIR} --exclude ${PIPELINE}-${VERSION}/*/tests/ref_data
+  tar czf ${BASEDIR}/${DEBIAN_PACKAGE}_${VERSION}.orig.tar.gz \
+      -C ${BASEDIR} ${PIPELINE}-${VERSION}/
+  rm -rf ${BASEDIR}/${PIPELINE}-${VERSION}/ 
+fi
 
 if [ $INCLUDE_CALIB = "yes" ] ; then
   mv ${BASEDIR}/${PIPELINE}-kit-${VERSION}/${PIPELINE}-calib-${VERSION}.tar.gz \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/cpl-plugin-template.git



More information about the Debian-astro-commits mailing list