Annotation of /trunk/magellan-initscripts/make-tarball.sh
Parent Directory | Revision Log
Revision 527 -
(hide annotations)
(download)
(as text)
Sat Sep 1 20:05:59 2007 UTC (17 years, 2 months ago) by niro
File MIME type: application/x-sh
File size: 969 byte(s)
Sat Sep 1 20:05:59 2007 UTC (17 years, 2 months ago) by niro
File MIME type: application/x-sh
File size: 969 byte(s)
-added tarball creation script
1 | niro | 527 | #!/bin/bash |
2 | |||
3 | temp=$(mktemp -d) | ||
4 | cvs_module="magellan-src/magellan-initscripts" | ||
5 | rev_keyword="init" | ||
6 | tarball_prefix="initscripts" | ||
7 | destination="root@magellan-linux.de:/magellan/magellan-dev/sources/initscripts/" | ||
8 | |||
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 | cvs -z3 -d :pserver:anonymous:@magellan-linux.de:/magellan-cvs checkout -P -r ${latest_revision} ${cvs_module} | ||
15 | mv ${temp}/${cvs_module} ${tarball_prefix}-${latest_version} | ||
16 | find ./${tarball_prefix}-${latest_version} -name CVS | xargs rm -r | ||
17 | tar cvjf ${tarball_prefix}-${latest_version}.tar.bz2 ./${tarball_prefix}-${latest_version} | ||
18 | scp ${tarball_prefix}-${latest_version}.tar.bz2 ${destination} | ||
19 | |||
20 | if [[ -d ${temp} ]] | ||
21 | then | ||
22 | rm -rf ${temp} | ||
23 | fi | ||
24 | |||
25 | exit 0 | ||
26 |