1fab17
#!/bin/sh
1fab17
1fab17
# Usage: ./make-git-snapshot.sh [COMMIT]
1fab17
#
1fab17
# to make a snapshot of the given tag/branch.  Defaults to HEAD.
1fab17
# Point env var REF to a local mesa repo to reduce clone time.
1fab17
1fab17
DIRNAME=xf86-video-ati-$( date +%Y%m%d )
1fab17
1fab17
echo REF ${REF:+--reference $REF}
1fab17
echo DIRNAME $DIRNAME
1fab17
echo HEAD ${1:-HEAD}
1fab17
1fab17
rm -rf $DIRNAME
1fab17
1fab17
git clone ${REF:+--reference $REF} \
1fab17
	git://git.freedesktop.org/git/xorg/driver/xf86-video-ati $DIRNAME
1fab17
1fab17
GIT_DIR=$DIRNAME/.git git archive --format=tar --prefix=$DIRNAME/ ${1:-HEAD} \
1fab17
	| xz > $DIRNAME.tar.xz
1fab17
1fab17
# rm -rf $DIRNAME