Blame SOURCES/make-git-snapshot.sh

331a07
#!/bin/sh
331a07
331a07
proto=$1
331a07
branch=$2
331a07
331a07
if [ -z "$proto" ]; then
331a07
    echo "Usage: $0 <proto name> [<branch>]"
331a07
    exit 1
331a07
fi
331a07
331a07
dirname=$proto-$( date +%Y%m%d )
331a07
331a07
rm -rf $dirname
331a07
git clone git://git.freedesktop.org/git/xorg/proto/$proto $dirname
331a07
cd $dirname
331a07
if [ -z "$branch" ]; then
331a07
    git log | head -1
331a07
else
331a07
    git checkout $branch
331a07
fi
331a07
sha=`git rev-list --max-count=1 --abbrev-commit HEAD`
331a07
git repack -a -d
331a07
cd ..
331a07
331a07
# append sha to dirname
331a07
mv $dirname $dirname-git$sha
331a07
dirname=$dirname-git$sha
331a07
tarball=$dirname.tar.bz2
331a07
tar jcf $tarball $dirname
331a07
rm -rf $dirname
331a07
echo "$tarball is now available"