Annotation of /trunk/udev/make-tarball.sh
Parent Directory | Revision Log
Revision 1506 -
(hide annotations)
(download)
(as text)
Fri Aug 26 19:18:31 2011 UTC (13 years, 2 months ago) by niro
File MIME type: application/x-sh
File size: 1395 byte(s)
Fri Aug 26 19:18:31 2011 UTC (13 years, 2 months ago) by niro
File MIME type: application/x-sh
File size: 1395 byte(s)
-force it
1 | niro | 719 | #!/bin/bash |
2 | |||
3 | temp=$(mktemp -d) | ||
4 | niro | 1125 | svn_base_uri="svn://cvs.magellan-linux.de/pkg-src" |
5 | svn_module="udev" | ||
6 | rev_keyword="${svn_module}" | ||
7 | niro | 1127 | tarball_prefix="config-udev" |
8 | niro | 1125 | destination="root@cvs.magellan-linux.de:/var/www/htdocs/magellan/magellan-dev/sources/${svn_module}/" |
9 | niro | 719 | |
10 | niro | 1125 | latest_revision=$(svn ls --verbose ${svn_base_uri}/tags | grep ${rev_keyword} | sort -nr | sed -e 's:/::' | awk '{ print $6; exit; }') |
11 | niro | 719 | latest_version=$(echo ${latest_revision} | sed -e "s:${rev_keyword}-::" -e 's:_:.:g') |
12 | |||
13 | echo -n "building tarball for ${latest_version}... " | ||
14 | cd ${temp} | ||
15 | niro | 1125 | svn checkout ${svn_base_uri}/tags/${latest_revision} ${svn_module} |
16 | # fix some import issues | ||
17 | if [[ -d ${temp}/${svn_module}/${svn_module} ]] | ||
18 | then | ||
19 | mv ${temp}/${svn_module}/${svn_module}/* ${temp}/${svn_module} | ||
20 | rm -rf ${temp}/${svn_module}/${svn_module} | ||
21 | fi | ||
22 | niro | 1504 | # remove patches directory from tarball |
23 | if [[ -d ${temp}/${svn_module}/patches ]] | ||
24 | then | ||
25 | niro | 1506 | rm -rf ${temp}/${svn_module}/patches |
26 | niro | 1504 | fi |
27 | niro | 1125 | mv ${temp}/${svn_module} ${tarball_prefix}-${latest_version} |
28 | niro | 719 | rm ./${tarball_prefix}-${latest_version}/make-tarball.sh |
29 | niro | 1125 | find ./${tarball_prefix}-${latest_version} -name .svn | xargs rm -r |
30 | find ./${tarball_prefix}-${latest_version} -name .svnignore | xargs rm | ||
31 | niro | 719 | tar cvjf ${tarball_prefix}-${latest_version}.tar.bz2 ./${tarball_prefix}-${latest_version} |
32 | scp ${tarball_prefix}-${latest_version}.tar.bz2 ${destination} | ||
33 | |||
34 | if [[ -d ${temp} ]] | ||
35 | then | ||
36 | rm -rf ${temp} | ||
37 | fi | ||
38 | |||
39 | exit 0 |