Blame SOURCES/make-git-snapshot.sh

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