e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsync#!/bin/bash
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsync## @file
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsync# For development, builds and loads all the host drivers.
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsync#
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsync
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsync#
c58f1213e628a545081c70e26c6b67a841cff880vboxsync# Copyright (C) 2010-2012 Oracle Corporation
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsync#
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsync# available from http://www.virtualbox.org. This file is free software;
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsync# you can redistribute it and/or modify it under the terms of the GNU
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsync# General Public License (GPL) as published by the Free Software
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsync#
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsync
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsyncMY_DIR=`dirname "$0"`
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsyncMY_DIR=`cd "${MY_DIR}" && pwd`
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsyncif [ ! -d "${MY_DIR}" ]; then
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsync echo "Cannot find ${MY_DIR} or it's not a directory..."
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsync exit 1;
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsyncfi
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsync
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsyncset -e
9a59b271202449cf51ec3ac13b8ef1b4b9810850vboxsyncmake -C "${MY_DIR}/src/vboxdrv" "$@"
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsyncsudo make -C "${MY_DIR}/src/" unload
e3e17b12a8230cd32c6ff2b7c36c467a75909726vboxsyncecho "Installing SUPDrv (aka VBoxDrv/vboxdrv)"
de36004aa41efe9fa849ab563186de22c4737234vboxsyncsudo /sbin/insmod "${MY_DIR}/src/vboxdrv/vboxdrv.ko"