From e1d696c11700dbd3307cadcf2d6c609eff5ff1bb Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 23 Jan 2017 23:35:02 +0000 Subject: update all virtualbox packages to 5.1.14 --- .../files/create_vbox_modules_tarball.sh | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 app-emulation/virtualbox-modules/files/create_vbox_modules_tarball.sh (limited to 'app-emulation/virtualbox-modules/files/create_vbox_modules_tarball.sh') diff --git a/app-emulation/virtualbox-modules/files/create_vbox_modules_tarball.sh b/app-emulation/virtualbox-modules/files/create_vbox_modules_tarball.sh new file mode 100755 index 00000000..756d2435 --- /dev/null +++ b/app-emulation/virtualbox-modules/files/create_vbox_modules_tarball.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Create a virtualbox modules tarball from a VirtualBox binary package. +# We cannot download the package by this script because of the unpredictable +# build number being in the filename. +# +# usage: create_vbox_modules_tarball.sh VirtualBox-4.1.18-78361-Linux_amd64.run + +[ -f "$1" ] || exit 1 + +VBOX_PACKAGE="$1" +VERSION_SUFFIX="" + +if [[ ${VBOX_PACKAGE} = *_BETA* ]] || [[ ${VBOX_PACKAGE} = *_RC* ]] ; then + VERSION_SUFFIX="$(echo ${VBOX_PACKAGE} | sed 's@.*VirtualBox-[[:digit:]\.]\+\(_[[:alpha:]]\+[[:digit:]]\).*@\L\1@')" + +fi + +VBOX_VER="$(echo ${VBOX_PACKAGE} | sed 's@.*VirtualBox-\([[:digit:]\.]\+\).*@\1@')${VERSION_SUFFIX}" + + +sh ${VBOX_PACKAGE} --noexec --keep --nox11 || exit 2 +cd install || exit 3 +tar -xaf VirtualBox.tar.bz2 || exit 4 +cd src/vboxhost || exit 5 +tar -cvJf ../../../vbox-kernel-module-src-${VBOX_VER}.tar.xz . || exit 6 +cd ../../.. && rm install -rf + +exit 0 -- cgit v1.2.3