Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2182 - (hide annotations) (download) (as text)
Mon Jun 3 09:40:08 2013 UTC (10 years, 11 months ago) by niro
File MIME type: application/x-sh
File size: 728 byte(s)
-fixed bsae version
1 niro 1346 #!/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=plymouth
8 niro 2182 DIRNAME=${MODULE}-0.8.8_$( date +%Y%m%d )
9 niro 1346 DESTINATION="root@cvs.magellan-linux.de:/var/www/htdocs/magellan/magellan-dev/sources/${MODULE}/"
10    
11     echo DIRNAME ${DIRNAME}
12     echo HEAD ${1:-HEAD}
13    
14     rm -rf ${DIRNAME}
15    
16     git clone git://anongit.freedesktop.org/git/${MODULE} ${DIRNAME}
17    
18     GIT_DIR=${DIRNAME}/.git git archive --format=tar --prefix=${DIRNAME}/ ${1:-HEAD} \
19     | bzip2 > ${DIRNAME}.tar.bz2
20    
21     echo "Uploading latest tarball for ${DIRNAME}"
22     scp ${DIRNAME}.tar.bz2 ${DESTINATION}
23    
24     if [[ -d ${DIRNAME} ]]
25     then
26     rm -rf ${DIRNAME}
27     fi
28     if [[ -f ${DIRNAME}.tar.bz2 ]]
29     then
30     rm ${DIRNAME}.tar.bz2
31     fi
32    
33     exit 0