[SCM] CLHEP: A Class Library for High Energy Physics branch, master, updated. upstream/2.1.2.3-9-g815c33a
Lifeng Sun
lifongsun at gmail.com
Wed Jun 13 12:36:34 UTC 2012
The following commit has been merged in the master branch:
commit d0241c09cf9796f43c2ed4c08bed7414d385830a
Author: Lifeng Sun <lifongsun at gmail.com>
Date: Wed Jun 13 20:01:51 2012 +0800
debian/get-orig-source: support --destdir option of uscan.
diff --git a/debian/get-orig-source b/debian/get-orig-source
index dbf957f..045d7a0 100755
--- a/debian/get-orig-source
+++ b/debian/get-orig-source
@@ -2,24 +2,28 @@
set -e
-[ $# == 3 ] || exit 1
+test $# == 3
-ver="$2"
-pkg="clhep"
-url="http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/tarFiles"
+URL="http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/tarFiles"
+VER="$2"
-# get official tarball
-[ ! -f "../$pkg-$ver.tgz" ] && \
- wget "$url/$pkg-$ver.tgz" -O ../$pkg-$ver.tgz
+UPTAR="clhep-$VER.tgz"
+UPDIR="$VER/CLHEP"
-[ -d "$ver" ] && rm -rf "$ver"
-tar xf "../$pkg-$ver.tgz"
+ORIGTAR="$3"
+ORIGDIR="clhep-$VER"
-mv "$ver/CLHEP" "$pkg-$ver"
-rmdir "$ver"
+DESTDIR="$(dirname "$ORIGTAR")"
-[ -e "../${pkg}_$ver.orig.tar.gz" ] && rm -f "../${pkg}_$ver.orig.tar.gz"
-tar zcf "../${pkg}_$ver.orig.tar.gz" "$pkg-$ver"
+test ! -f "$DESTDIR/$UPTAR" && wget "$URL/$UPTAR" -O "$DESTDIR/$UPTAR"
-rm -rf "$pkg-$ver"
+test -d "$VER" && rm -rf "$VER"
+tar -xf "$DESTDIR/$UPTAR"
+
+mv "$UPDIR" "$ORIGDIR"
+
+test -e "$ORIGTAR" && rm -f "$ORIGTAR"
+GZIP=-9 tar --remove-files -zcf "$ORIGTAR" "$ORIGDIR"
+
+rmdir "$VER"
--
CLHEP: A Class Library for High Energy Physics
More information about the debian-science-commits
mailing list