Blame SOURCES/make-git-snapshot.sh

230118
#!/bin/sh
230118
230118
# Usage: ./make-git-snapshot.sh [COMMIT]
230118
#
230118
# to make a snapshot of the given tag/branch.  Defaults to HEAD.
230118
# Point env var REF to a local mesa repo to reduce clone time.
230118
230118
if [ -e /usr/bin/pxz ]; then
230118
    XZ=/usr/bin/pxz
230118
else
230118
    XZ=/usr/bin/xz
230118
fi
230118
230118
DIRNAME=mesa-$( date +%Y%m%d )
230118
230118
echo REF ${REF:+--reference $REF}
230118
echo DIRNAME $DIRNAME
762a8c
echo HEAD ${1:-10.6}
230118
230118
rm -rf $DIRNAME
230118
762a8c
git clone --depth 1 ${REF:+--reference $REF} --branch 10.6 \
230118
	git://git.freedesktop.org/git/mesa/mesa $DIRNAME
230118
230118
GIT_DIR=$DIRNAME/.git git archive --format=tar --prefix=$DIRNAME/ ${1:-HEAD} \
230118
	| $XZ > $DIRNAME.tar.xz
230118
230118
# rm -rf $DIRNAME