Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1636 - (hide annotations) (download) (as text)
Sun Feb 5 01:33:35 2012 UTC (12 years, 3 months ago) by niro
File MIME type: application/x-sh
File size: 451 byte(s)
-fixed version
1 niro 1635 #!/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    
7     MODULE=dracut
8 niro 1636 DIRNAME=${MODULE}-014_$( date +%Y%m%d )
9 niro 1635
10     echo DIRNAME ${DIRNAME}
11     echo HEAD ${1:-HEAD}
12    
13     rm -rf ${DIRNAME}
14    
15     git clone git://git.kernel.org/pub/scm/boot/${MODULE}/${MODULE}.git ${DIRNAME}
16    
17     GIT_DIR=${DIRNAME}/.git git archive --format=tar --prefix=${DIRNAME}/ ${1:-HEAD} | bzip2 > ${DIRNAME}.tar.bz2
18    
19     # rm -rf ${DIRNAME}