[Pkg-ocaml-maint-commits] [SCM] why packaging branch, master, updated. debian/2.18.dfsg-1-4-g3e8e278

Mehdi Dogguy dogguy at pps.jussieu.fr
Sun Mar 22 11:41:40 UTC 2009


The following commit has been merged in the master branch:
commit c06821cc593760b3f3861a3860e7dec10a9c757f
Author: Mehdi Dogguy <dogguy at pps.jussieu.fr>
Date:   Sun Mar 22 12:41:26 2009 +0100

    Add a script to purify the tarball

diff --git a/debian/purify_tarball b/debian/purify_tarball
new file mode 100755
index 0000000..af10bdb
--- /dev/null
+++ b/debian/purify_tarball
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+set -e
+
+ORIG=$1
+CURDIR=`pwd`
+WORKDIR=`dirname $ORIG`
+ORIGFILE=`basename $ORIG`
+VERSION=`echo "$ORIGFILE" | sed "s/^why-\([0-9\.]\+\)\.tar\.gz$/\1/"`
+
+cd $WORKDIR
+
+safe_remove ()
+{
+  rm -rf $1 || echo $1 not found
+}
+
+if test -d why-$VERSION; then
+  echo "Directory why-$VERSION exists"
+  exit 1
+fi
+
+tar xzf $ORIGFILE
+
+safe_remove why-$VERSION/doc/manual.ps
+
+tar czf why_$VERSION.dfsg.orig.tar.gz why-$VERSION/
+rm -rf why-$VERSION
+
+cd $CURDIR

-- 
why packaging



More information about the Pkg-ocaml-maint-commits mailing list