1 | #!/bin/sh
|
---|
2 | # Use this script in conjunction with snapshot-ose.sh
|
---|
3 |
|
---|
4 | vboxdir=`pwd`
|
---|
5 | if [ ! -r "$vboxdir/Config.kmk" -o ! -r "$vboxdir/Doxyfile.Core" ]; then
|
---|
6 | echo "Is $vboxdir really a VBox tree?"
|
---|
7 | exit 1
|
---|
8 | fi
|
---|
9 | if [ -r "$vboxdir/src/VBox/RDP/server/server.cpp" ]; then
|
---|
10 | echo "Found RDP stuff, refused to build OSE tarball!"
|
---|
11 | exit 1
|
---|
12 | fi
|
---|
13 | vermajor=`grep "^VBOX_VERSION_MAJOR *=" "$vboxdir/Version.kmk"|sed -e "s|.*= *\(.*\)|\1|g"`
|
---|
14 | verminor=`grep "^VBOX_VERSION_MINOR *=" "$vboxdir/Version.kmk"|sed -e "s|.*= *\(.*\)|\1|g"`
|
---|
15 | verbuild=`grep "^VBOX_VERSION_BUILD *=" "$vboxdir/Version.kmk"|sed -e "s|.*= *\(.*\)|\1|g"`
|
---|
16 | rootpath=`cd ..;pwd`
|
---|
17 | verstr="$vermajor.$verminor.$verbuild"
|
---|
18 | rootname="VirtualBox-$verstr"
|
---|
19 | rm -f "$rootpath/$rootname"
|
---|
20 | ln -s `basename "$vboxdir"` "$rootpath/$rootname"
|
---|
21 | if [ $? -ne 0 ]; then
|
---|
22 | echo "Cannot create root directory link!"
|
---|
23 | exit 1
|
---|
24 | fi
|
---|
25 | tar \
|
---|
26 | --create \
|
---|
27 | --bzip2 \
|
---|
28 | --dereference \
|
---|
29 | --owner 0 \
|
---|
30 | --group 0 \
|
---|
31 | --totals \
|
---|
32 | --exclude=.svn \
|
---|
33 | --exclude="$rootname/out" \
|
---|
34 | --exclude="$rootname/env.sh" \
|
---|
35 | --exclude="$rootname/configure.log" \
|
---|
36 | --exclude="$rootname/build.log" \
|
---|
37 | --exclude="$rootname/AutoConfig.kmk" \
|
---|
38 | --exclude="$rootname/LocalConfig.kmk" \
|
---|
39 | --exclude="$rootname/prebuild" \
|
---|
40 | --directory "$rootpath" \
|
---|
41 | --file "$rootpath/$rootname.tar.bz2" \
|
---|
42 | "$rootname"
|
---|
43 | echo "Successfully created $rootpath/$rootname.tar.bz2"
|
---|
44 | rm -f "$rootpath/$rootname"
|
---|