Annotation of /trunk/virtualbox/make-svn-snapshot.sh
Parent Directory | Revision Log
Revision 1671 -
(hide annotations)
(download)
(as text)
Sat Mar 3 02:47:18 2012 UTC (12 years, 8 months ago) by niro
File MIME type: application/x-sh
File size: 1221 byte(s)
Sat Mar 3 02:47:18 2012 UTC (12 years, 8 months ago) by niro
File MIME type: application/x-sh
File size: 1221 byte(s)
-add svn snapshot script
1 | niro | 1671 | #!/bin/bash |
2 | |||
3 | export LC_ALL=C | ||
4 | |||
5 | temp=$(mktemp -d) | ||
6 | svn_base_uri="http://www.virtualbox.org/svn/vbox/trunk" | ||
7 | svn_module="virtualbox" | ||
8 | tarball_prefix="${svn_module}" | ||
9 | destination="root@cvs.magellan-linux.de:/var/www/htdocs/magellan/magellan-dev/sources/${svn_module}/" | ||
10 | |||
11 | echo -n "building latest tarball for ${tarball_prefix}... " | ||
12 | cd ${temp} | ||
13 | svn checkout ${svn_base_uri} ${svn_module} | ||
14 | ver_major="$(grep '^VBOX_VERSION_MAJOR\ =' ${svn_module}/Config.kmk | sed 's:.*= \(.*\):\1:')" | ||
15 | ver_minor="$(grep '^VBOX_VERSION_MINOR\ =' ${svn_module}/Config.kmk | sed 's:.*= \(.*\):\1:')" | ||
16 | ver_build="$(grep '^VBOX_VERSION_BUILD\ =' ${svn_module}/Config.kmk | sed 's:.*= \(.*\):\1:')" | ||
17 | svn_rev="$(svn info ${svn_module} | grep Revision | sed 's:.*\:\ \(.*\):\1:')" | ||
18 | latest_version="${ver_major}.${ver_minor}.${ver_build}_svn${svn_rev}" | ||
19 | mv ${temp}/${svn_module} ${tarball_prefix}-${latest_version} | ||
20 | find ./${tarball_prefix}-${latest_version} -name .svn | xargs rm -r | ||
21 | find ./${tarball_prefix}-${latest_version} -name .svnignore | xargs rm | ||
22 | tar cvjf ${tarball_prefix}-${latest_version}.tar.bz2 ./${tarball_prefix}-${latest_version} | ||
23 | scp ${tarball_prefix}-${latest_version}.tar.bz2 ${destination} | ||
24 | |||
25 | #if [[ -d ${temp} ]] | ||
26 | #then | ||
27 | # rm -rf ${temp} | ||
28 | #fi | ||
29 | |||
30 | exit 0 |