[Pkg-haskell-commits] darcs: tools: Add XZ support to pkg-haskell-checkout
Joachim Breitner
mail at joachim-breitner.de
Sat May 26 15:45:23 UTC 2012
Sat May 26 15:45:20 UTC 2012 Joachim Breitner <mail at joachim-breitner.de>
* Add XZ support to pkg-haskell-checkout
Ignore-this: abba990fc7b23b7ef0cc9d7f24e8e767
M ./pkg-haskell-checkout -3 +9
Sat May 26 15:45:20 UTC 2012 Joachim Breitner <mail at joachim-breitner.de>
* Add XZ support to pkg-haskell-checkout
Ignore-this: abba990fc7b23b7ef0cc9d7f24e8e767
diff -rN -u old-tools//pkg-haskell-checkout new-tools//pkg-haskell-checkout
--- old-tools//pkg-haskell-checkout 2012-05-26 15:45:23.506338015 +0000
+++ new-tools//pkg-haskell-checkout 2012-05-26 15:45:23.522362535 +0000
@@ -65,10 +65,11 @@
fi
TARBALL_GZ=${PACKAGE}_$UPSTREAM.orig.tar.gz
TARBALL_BZ2=${PACKAGE}_$UPSTREAM.orig.tar.bz2
+ TARBALL_XZ=${PACKAGE}_$UPSTREAM.orig.tar.xz
WANTED_PACKAGEDIR="${PACKAGE}-${UPSTREAM}"
# see 375138 for why this doesn't work as well as it could. Fall back to apt-get source
# as a last resort.
- [ ! -e $TARBALL_GZ -a ! -e $TARBALL_BZ2 ] && \
+ [ ! -e $TARBALL_GZ -a ! -e $TARBALL_BZ2 -a ! -e $TARBALL_XZ ] && \
( uscan \
--rename \
--force-download \
@@ -81,7 +82,7 @@
--rename ||
apt-get source $PACKAGE --tar-only )
- if [ ! -e $TARBALL_GZ -a ! -e $TARBALL_BZ2 ]
+ if [ ! -e $TARBALL_GZ -a ! -e $TARBALL_BZ2 -a ! -e $TARBALL_XZ ]
then
echo "Couldn't download tarball with uscan or apt-get source. See above for errors"
exit 1
@@ -94,7 +95,12 @@
then
tar xavf $TARBALL_GZ -C $WANTED_PACKAGEDIR --strip-components 1
else
- tar xavf $TARBALL_BZ2 -C $WANTED_PACKAGEDIR --strip-components 1
+ if [ -e $TARBALL_XZ ]
+ then
+ tar xavf $TARBALL_XZ -C $WANTED_PACKAGEDIR --strip-components 1
+ else
+ tar xavf $TARBALL_BZ2 -C $WANTED_PACKAGEDIR --strip-components 1
+ fi
fi
# debian directories shipped by upstream need to be removed
More information about the Pkg-haskell-commits
mailing list