7fbd22
#!/bin/sh
7fbd22
7fbd22
DIRNAME=libX11-$( date +%Y%m%d )
7fbd22
7fbd22
rm -rf $DIRNAME
7fbd22
git clone git://git.freedesktop.org/git/xorg/lib/libX11 $DIRNAME
7fbd22
cd $DIRNAME
7fbd22
if [ -z "$1" ]; then
7fbd22
    git log | head -1
7fbd22
else
7fbd22
    git checkout $1
7fbd22
fi
7fbd22
git log | head -1 | awk '{ print $2 }' > ../commitid
7fbd22
git repack -a -d
7fbd22
cd ..
7fbd22
tar jcf $DIRNAME.tar.bz2 $DIRNAME
7fbd22
rm -rf $DIRNAME