VirtualBox

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

Last change on this file since 89363 was 82968, checked in by vboxsync, 5 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
File size: 2.2 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-2020 Oracle Corporation
9#
10# This file is part of VirtualBox Open Source Edition (OSE), as
11# available from http://www.virtualbox.org. This file is free software;
12# you can redistribute it and/or modify it under the terms of the GNU
13# General Public License (GPL) as published by the Free Software
14# Foundation, in version 2 as it comes in the "COPYING" file of the
15# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17#
18
19vboxdir=`pwd`
20if [ ! -r "$vboxdir/Config.kmk" -o ! -r "$vboxdir/Doxyfile.Core" ]; then
21 echo "Is $vboxdir really a VBox tree?"
22 exit 1
23fi
24if [ -r "$vboxdir/src/VBox/RDP/server/server.cpp" ]; then
25 echo "Found RDP stuff, refused to build OSE tarball!"
26 exit 1
27fi
28vermajor=`grep "^VBOX_VERSION_MAJOR *=" "$vboxdir/Version.kmk"|sed -e "s|.*= *\(.*\)|\1|g"`
29verminor=`grep "^VBOX_VERSION_MINOR *=" "$vboxdir/Version.kmk"|sed -e "s|.*= *\(.*\)|\1|g"`
30verbuild=`grep "^VBOX_VERSION_BUILD *=" "$vboxdir/Version.kmk"|sed -e "s|.*= *\(.*\)|\1|g"`
31verpre=`grep "^VBOX_VERSION_PRERELEASE *=" "$vboxdir/Version.kmk"|sed -e "s|.*= *\(.*\)|\1|g"`
32verpub=`grep "^VBOX_BUILD_PUBLISHER *=" "$vboxdir/Version.kmk"|sed -e "s|.*= *\(.*\)|\1|g"`
33verstr="$vermajor.$verminor.$verbuild"
34[ -n "$verpre" ] && verstr="$verstr"_"$verpre"
35[ -n "$verpub" ] && verstr="$verstr$verpub"
36rootpath=`cd ..;pwd`
37rootname="VirtualBox-$verstr"
38if [ $# -eq 1 ]; then
39 tarballname="$1"
40else
41 tarballname="$rootpath/$rootname.tar.bz2"
42fi
43rm -f "$rootpath/$rootname"
44ln -s `basename "$vboxdir"` "$rootpath/$rootname"
45if [ $? -ne 0 ]; then
46 echo "Cannot create root directory link!"
47 exit 1
48fi
49tar \
50 --create \
51 --bzip2 \
52 --dereference \
53 --owner 0 \
54 --group 0 \
55 --totals \
56 --exclude=.svn \
57 --exclude="$rootname/out" \
58 --exclude="$rootname/env.sh" \
59 --exclude="$rootname/configure.log" \
60 --exclude="$rootname/build.log" \
61 --exclude="$rootname/AutoConfig.kmk" \
62 --exclude="$rootname/LocalConfig.kmk" \
63 --exclude="$rootname/prebuild" \
64 --directory "$rootpath" \
65 --file "$tarballname" \
66 "$rootname"
67echo "Successfully created $tarballname"
68rm -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