Annotation of /trunk/mage/make-tarball.sh
Parent Directory | Revision Log
Revision 647 -
(hide annotations)
(download)
(as text)
Tue Jan 1 16:42:14 2008 UTC (16 years, 10 months ago) by niro
File MIME type: application/x-sh
File size: 1090 byte(s)
Tue Jan 1 16:42:14 2008 UTC (16 years, 10 months ago) by niro
File MIME type: application/x-sh
File size: 1090 byte(s)
-fixed CVSROOT and DESTINATION
1 | niro | 530 | #!/bin/bash |
2 | |||
3 | temp=$(mktemp -d) | ||
4 | cvs_module="magellan-src/mage" | ||
5 | rev_keyword="mage" | ||
6 | tarball_prefix="mage" | ||
7 | niro | 647 | destination="root@cvs.magellan-linux.de:/var/www/htdocs/magellan/magellan-dev/sources/mage/" |
8 | niro | 530 | |
9 | latest_revision=$(cvs status -v make-tarball.sh | grep -A1 "Existing Tags:" | sed -e 's/Existing Tags://' -e 's/ //g' -e '/^$/d' | /bin/awk '{ print $1; exit; }') | ||
10 | latest_version=$(echo ${latest_revision} | sed -e "s:${rev_keyword}-::" -e 's:_:.:g') | ||
11 | |||
12 | echo -n "building tarball for ${latest_version}... " | ||
13 | cd ${temp} | ||
14 | niro | 647 | cvs -z3 -d :pserver:anonymous:@cvs.magellan-linux.de:/magellan-cvs checkout -P -r ${latest_revision} ${cvs_module} |
15 | niro | 530 | mv ${temp}/${cvs_module} ${tarball_prefix}-${latest_version} |
16 | rm ./${tarball_prefix}-${latest_version}/make-tarball.sh | ||
17 | find ./${tarball_prefix}-${latest_version} -name CVS | xargs rm -r | ||
18 | niro | 551 | find ./${tarball_prefix}-${latest_version} -name .cvsignore | xargs rm |
19 | niro | 530 | tar cvjf ${tarball_prefix}-${latest_version}.tar.bz2 ./${tarball_prefix}-${latest_version} |
20 | scp ${tarball_prefix}-${latest_version}.tar.bz2 ${destination} | ||
21 | |||
22 | if [[ -d ${temp} ]] | ||
23 | then | ||
24 | rm -rf ${temp} | ||
25 | fi | ||
26 | |||
27 | exit 0 | ||
28 |