Magellan Linux

Annotation of /trunk/libdrm/make-git-snapshot.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 540 - (hide annotations) (download) (as text)
Wed Mar 26 23:41:17 2008 UTC (16 years, 1 month ago) by niro
File MIME type: application/x-sh
File size: 532 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=libdrm-2.3.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/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