Annotation of /trunk/mesa/make-git-snapshot.sh
Parent Directory | Revision Log
Revision 540 -
(hide annotations)
(download)
(as text)
Wed Mar 26 23:41:17 2008 UTC (16 years, 7 months ago) by niro
File MIME type: application/x-sh
File size: 531 byte(s)
Wed Mar 26 23:41:17 2008 UTC (16 years, 7 months ago) by niro
File MIME type: application/x-sh
File size: 531 byte(s)
-added git script
1 | niro | 540 | #!/bin/sh |
2 | |||
3 | # Usage: ./make-git-snapshot.sh [COMMIT] | ||
4 | # | ||
5 | # to make a snapshot of the given tag/branch. Defaults to HEAD. | ||
6 | # Point env var REF to a local mesa repo to reduce clone time. | ||
7 | |||
8 | DIRNAME=mesa-7.0.99_$( date +%Y%m%d ) | ||
9 | |||
10 | echo REF ${REF:+--reference $REF} | ||
11 | echo DIRNAME $DIRNAME | ||
12 | echo HEAD ${1:-HEAD} | ||
13 | |||
14 | rm -rf $DIRNAME | ||
15 | |||
16 | git clone ${REF:+--reference $REF} \ | ||
17 | git://git.freedesktop.org/git/mesa/mesa $DIRNAME | ||
18 | |||
19 | GIT_DIR=$DIRNAME/.git git archive --format=tar --prefix=$DIRNAME/ ${1:-HEAD} \ | ||
20 | | bzip2 > $DIRNAME.tar.bz2 | ||
21 | |||
22 | # rm -rf $DIRNAME |