From cdb3c0882392596f814cf939cbfbd38adc6f2bfe Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Mon, 22 Jan 2007 12:17:17 +0000 Subject: [PATCH 1/1] Create import script. Organization: Straylight/Edgeware From: Mark Wooding --- import | 37 +++++++++++++++++++++++++++++++++++++ make-deb-source | 6 ++++++ 2 files changed, 43 insertions(+) create mode 100755 import create mode 100755 make-deb-source diff --git a/import b/import new file mode 100755 index 0000000..dead84e --- /dev/null +++ b/import @@ -0,0 +1,37 @@ +#! /bin/sh + +set -e +tarball=${1?tarball} +case $tarball in /*);; *) tarball=`pwd`/$tarball;; esac +tmp=${TMPDIR-/tmp}/mup-$$ +mkdir $tmp +: ${GIT_DIR=`git rev-parse --git-dir`} +case $GIT_DIR in /*);; *) GIT_DIR=`pwd`/$GIT_DIR;; esac +export GIT_DIR +trap 'cd /; rm -rf $tmp' 0 +cd $tmp +GIT_INDEX_FILE=$tmp/index +export GIT_INDEX_FILE + +mkdir unpack; cd unpack +tar xfz $tarball +mupdir=`ls -d mup-*` +version=${mupdir#mup-} +cp $tarball mup_$version.orig.tar.gz +mv $mupdir mup +echo $version + +find . -type f -print0 | git update-index --add -z --stdin +tree=$(git write-tree) +if [ -f $GIT_DIR/refs/heads/arkkra ]; then + pp="-p $(cat $GIT_DIR/refs/heads/arkkra)" +else + pp="" +fi +commit=$( + echo "Import upstream version $version." | + git commit-tree $tree $pp +) +git update-ref refs/heads/arkkra $commit +git update-ref refs/tags/$version $commit +echo "Imported Mup $version: $commit" diff --git a/make-deb-source b/make-deb-source new file mode 100755 index 0000000..5a4d24d --- /dev/null +++ b/make-deb-source @@ -0,0 +1,6 @@ +#! /bin/sh + +set -e +fakeroot debian/rules clean +cd .. +dpkg-source -b mup mup_*.orig.tar.gz -- [mdw]