VirtualBox

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

Last change on this file since 104429 was 98103, checked in by vboxsync, 22 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
File size: 2.5 KB
RevLine 
[67129]1#!/bin/sh
[69490]2# $Id$
3## @file
[67129]4# Use this script in conjunction with snapshot-ose.sh
[69490]5#
[67129]6
[69490]7#
[98103]8# Copyright (C) 2006-2023 Oracle and/or its affiliates.
[69490]9#
[96407]10# This file is part of VirtualBox base platform packages, as
11# available from https://www.virtualbox.org.
[69490]12#
[96407]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#
[69490]28
[67129]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
[69365]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"`
[75097]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"
[67129]46rootpath=`cd ..;pwd`
47rootname="VirtualBox-$verstr"
[75112]48if [ $# -eq 1 ]; then
[75097]49 tarballname="$1"
50else
51 tarballname="$rootpath/$rootname.tar.bz2"
52fi
[67129]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" \
[75097]75 --file "$tarballname" \
[67129]76 "$rootname"
[75097]77echo "Successfully created $tarballname"
[67129]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