VirtualBox

source: vbox/trunk/tools/bin/ose-tarball.sh@ 104054

Last change on this file since 104054 was 98103, checked in by vboxsync, 23 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
File size: 2.5 KB
Line 
1#!/bin/sh
2# $Id$
3## @file
4# Use this script in conjunction with snapshot-ose.sh
5#
6
7#
8# Copyright (C) 2006-2023 Oracle and/or its affiliates.
9#
10# This file is part of VirtualBox base platform packages, as
11# available from https://www.virtualbox.org.
12#
13# This program is free software; you can redistribute it and/or
14# modify it under the terms of the GNU General Public License
15# as published by the Free Software Foundation, in version 3 of the
16# License.
17#
18# This program is distributed in the hope that it will be useful, but
19# WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21# General Public License for more details.
22#
23# You should have received a copy of the GNU General Public License
24# along with this program; if not, see <https://www.gnu.org/licenses>.
25#
26# SPDX-License-Identifier: GPL-3.0-only
27#
28
29vboxdir=`pwd`
30if [ ! -r "$vboxdir/Config.kmk" -o ! -r "$vboxdir/Doxyfile.Core" ]; then
31 echo "Is $vboxdir really a VBox tree?"
32 exit 1
33fi
34if [ -r "$vboxdir/src/VBox/RDP/server/server.cpp" ]; then
35 echo "Found RDP stuff, refused to build OSE tarball!"
36 exit 1
37fi
38vermajor=`grep "^VBOX_VERSION_MAJOR *=" "$vboxdir/Version.kmk"|sed -e "s|.*= *\(.*\)|\1|g"`
39verminor=`grep "^VBOX_VERSION_MINOR *=" "$vboxdir/Version.kmk"|sed -e "s|.*= *\(.*\)|\1|g"`
40verbuild=`grep "^VBOX_VERSION_BUILD *=" "$vboxdir/Version.kmk"|sed -e "s|.*= *\(.*\)|\1|g"`
41verpre=`grep "^VBOX_VERSION_PRERELEASE *=" "$vboxdir/Version.kmk"|sed -e "s|.*= *\(.*\)|\1|g"`
42verpub=`grep "^VBOX_BUILD_PUBLISHER *=" "$vboxdir/Version.kmk"|sed -e "s|.*= *\(.*\)|\1|g"`
43verstr="$vermajor.$verminor.$verbuild"
44[ -n "$verpre" ] && verstr="$verstr"_"$verpre"
45[ -n "$verpub" ] && verstr="$verstr$verpub"
46rootpath=`cd ..;pwd`
47rootname="VirtualBox-$verstr"
48if [ $# -eq 1 ]; then
49 tarballname="$1"
50else
51 tarballname="$rootpath/$rootname.tar.bz2"
52fi
53rm -f "$rootpath/$rootname"
54ln -s `basename "$vboxdir"` "$rootpath/$rootname"
55if [ $? -ne 0 ]; then
56 echo "Cannot create root directory link!"
57 exit 1
58fi
59tar \
60 --create \
61 --bzip2 \
62 --dereference \
63 --owner 0 \
64 --group 0 \
65 --totals \
66 --exclude=.svn \
67 --exclude="$rootname/out" \
68 --exclude="$rootname/env.sh" \
69 --exclude="$rootname/configure.log" \
70 --exclude="$rootname/build.log" \
71 --exclude="$rootname/AutoConfig.kmk" \
72 --exclude="$rootname/LocalConfig.kmk" \
73 --exclude="$rootname/prebuild" \
74 --directory "$rootpath" \
75 --file "$tarballname" \
76 "$rootname"
77echo "Successfully created $tarballname"
78rm -f "$rootpath/$rootname"
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette