Annotation of /trunk/libdrm/make-git-snapshot.sh
Parent Directory | Revision Log
Revision 2809 -
(hide annotations)
(download)
(as text)
Thu Jun 16 13:05:36 2016 UTC (7 years, 11 months ago) by niro
File MIME type: application/x-sh
File size: 532 byte(s)
Thu Jun 16 13:05:36 2016 UTC (7 years, 11 months ago) by niro
File MIME type: application/x-sh
File size: 532 byte(s)
-updated version
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 | niro | 2809 | DIRNAME=libdrm-2.4.68_$( date +%Y%m%d ) |
9 | niro | 540 | |
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/drm $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 |