5 case $tarball in /*);; *) tarball
=`pwd`/$tarball;; esac
6 tmp
=${TMPDIR-/tmp}/mup-$$
8 : ${GIT_DIR=`git rev-parse --git-dir`}
9 case $GIT_DIR in /*);; *) GIT_DIR
=`pwd`/$GIT_DIR;; esac
11 trap 'cd /; rm -rf $tmp' 0
13 GIT_INDEX_FILE
=$tmp/index
16 mkdir unpack
; cd unpack
19 version
=${mupdir#mup-}
20 cp $tarball mup_
$version.orig.
tar.gz
24 find .
-type f
-print0 | git update-index
--add
-z
--stdin
25 tree
=$
(git write-tree
)
26 if [ -f
$GIT_DIR/refs
/heads
/arkkra
]; then
27 pp
="-p $(cat $GIT_DIR/refs/heads/arkkra)"
32 echo "Import upstream version $version." |
33 git commit-tree
$tree $pp
35 git update-ref refs
/heads
/arkkra
$commit
36 git update-ref refs
/tags
/$version $commit
37 echo "Imported Mup $version: $commit"