Annotation of /mcore-src/tags/mcore-tools-1_0_0/make-svn-snapshot.sh
Parent Directory | Revision Log
Revision 2793 -
(hide annotations)
(download)
(as text)
Fri Jun 10 10:28:54 2016 UTC (8 years, 3 months ago) by niro
Original Path: mcore-src/trunk/mcore-tools/make-svn-snapshot.sh
File MIME type: application/x-sh
File size: 901 byte(s)
Fri Jun 10 10:28:54 2016 UTC (8 years, 3 months ago) by niro
Original Path: mcore-src/trunk/mcore-tools/make-svn-snapshot.sh
File MIME type: application/x-sh
File size: 901 byte(s)
-fixed tarball upload
1 | niro | 1898 | #!/bin/bash |
2 | |||
3 | export LC_ALL=C | ||
4 | |||
5 | temp=$(mktemp -d) | ||
6 | svn_base_uri="svn://cvs.magellan-linux.de/mcore/mcore-src/trunk/mcore-tools" | ||
7 | svn_module="mcore-tools" | ||
8 | tarball_prefix="${svn_module}" | ||
9 | niro | 2793 | destination="tjoke@cvs.magellan-linux.de:/var/www/htdocs/magellan/magellan-dev/sources/${svn_module}/" |
10 | niro | 1898 | |
11 | echo -n "building latest tarball for ${tarball_prefix}... " | ||
12 | cd ${temp} | ||
13 | svn checkout ${svn_base_uri} ${svn_module} | ||
14 | |||
15 | latest_version="0.1_svn$(svn info ${svn_module} | grep Revision | sed 's:.*\:\ \(.*\):\1:')" | ||
16 | |||
17 | mv ${temp}/${svn_module} ${tarball_prefix}-${latest_version} | ||
18 | find ./${tarball_prefix}-${latest_version} -name .svn | xargs rm -r | ||
19 | find ./${tarball_prefix}-${latest_version} -name .svnignore | xargs rm | ||
20 | tar cvjf ${tarball_prefix}-${latest_version}.tar.bz2 ./${tarball_prefix}-${latest_version} | ||
21 | scp ${tarball_prefix}-${latest_version}.tar.bz2 ${destination} | ||
22 | |||
23 | if [[ -d ${temp} ]] | ||
24 | then | ||
25 | rm -rf ${temp} | ||
26 | fi | ||
27 | |||
28 | exit 0 |