Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1346 - (show annotations) (download) (as text)
Fri Jun 3 12:48:25 2011 UTC (12 years, 10 months ago) by niro
File MIME type: application/x-sh
File size: 728 byte(s)
added git snapshit script
1 #!/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 DIRNAME=${MODULE}-0.8.4_$( date +%Y%m%d )
9 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