520bba
#!/bin/sh
520bba
520bba
DIRNAME=xorg-server-$( date +%Y%m%d )
520bba
520bba
rm -rf $DIRNAME
520bba
git clone git://git.freedesktop.org/git/xorg/xserver $DIRNAME
520bba
cd $DIRNAME
520bba
if [ -z "$1" ]; then
520bba
    git log | head -1
520bba
else
520bba
    git checkout $1
520bba
fi
520bba
git log | head -1 | awk '{ print $2 }' > ../commitid
520bba
git repack -a -d
520bba
cd ..
3255e5
tar cf - $DIRNAME | xz -c9 > $DIRNAME.tar.xz
520bba
rm -rf $DIRNAME