On Sat, 2005-04-23 at 14:58 +0200, Jan Dittmer wrote:
> I didn't found above mentioned post, so I hacked up a cruel script
> myself. It relies on ketchup (www.selenic.com/ketchup)
> to retrieve the current base version. Also it requires git's
> `checkout-cache --prefix=` to work properly.
Thanks... but it seems a little excessive. I was thinking of something
much simpler; along the lines of...
#!/bin/sh
STAGE=/staging/dwmw2/git
cd /home/dwmw2/git/snapshot-2.6
git pull || exit 1
LASTRELEASE=`ls -rt .git/tags | grep -v git | grep -v MailDone | tail -1`
LASTTAG=`ls -rt .git/tags | grep -v MailDone | tail -1`
CURCOMMIT=`commit-id`
LASTCOMMIT=`cat .git/tags/$LASTTAG`
RELCOMMIT=`cat .git/tags/$LASTRELEASE`
[ "$LASTCOMMIT" = "$CURCOMMIT" ] && exit 0
CURTREE=`tree-id $CURCOMMIT`
#LASTTREE=`tree-id $LASTCOMMIT`
RELTREE=`tree-id $RELCOMMIT`
if echo $LASTTAG | grep -q -- -git ; then
OLDGITNUM=`echo $LASTTAG | sed s/^.*-git//`
NEWGITNUM=`expr $OLDGITNUM + 1`
NEWTAG=`echo $LASTTAG | sed s/-git$OLDGITNUM/-git$NEWGITNUM/`
else
NEWTAG=$LASTTAG-git1
fi
echo $commit-id > $STAGE/$NEWTAG.id
# This is, unfortunately, in chronological order. Walking the tree would
# be better.
git log $CURCOMMIT ^$RELCOMMIT > $STAGE/$NEWTAG.log
git diff -r $RELTREE -r $CURTREE | gzip -9 > $STAGE/patch-$NEWTAG.gz
echo $CURCOMMIT > .git/tags/$NEWTAG
--
dwmw2
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]