postflight revision 2009785c2bc1d376c4919f55ddba552a22e1ce26
0a05fab9aadd37834734ffe106fc8ad4488fb3e3rbowen# Copyright (C) 2007-2010 Oracle Corporation
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd# This file is part of VirtualBox Open Source Edition (OSE), as
031b91a62d25106ae69d4693475c79618dd5e884fielding# available from http://www.virtualbox.org. This file is free software;
031b91a62d25106ae69d4693475c79618dd5e884fielding# you can redistribute it and/or modify it under the terms of the GNU
031b91a62d25106ae69d4693475c79618dd5e884fielding# General Public License (GPL) as published by the Free Software
031b91a62d25106ae69d4693475c79618dd5e884fielding# Foundation, in version 2 as it comes in the "COPYING" file of the
031b91a62d25106ae69d4693475c79618dd5e884fielding# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
031b91a62d25106ae69d4693475c79618dd5e884fielding# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd# Correct the ownership of the directories in case there
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd# was an existing installation.
714c811200789fde839f46fe904db50b458afe1byoshiki# Select the right architecture.
208651a016b098f4fa1f6279559f104d70f1632dtakashifor trg in `ls /Applications/VirtualBox.app/Contents/MacOS/*-${MY_ARCH}`;
714c811200789fde839f46fe904db50b458afe1byoshiki linkname=`echo "$trg" | sed -e 's|-'"${MY_ARCH}"'$||' `
5feb3e793f498910da27b70e591fc021e378e44byoshiki# Install the Python bindings
714c811200789fde839f46fe904db50b458afe1byoshikiVBOX_INSTALL_PATH=/Applications/VirtualBox.app/Contents/MacOS
714c811200789fde839f46fe904db50b458afe1byoshikiif [ -e "${VBOX_INSTALL_PATH}/sdk/installer/vboxapisetup.py" ]; then
208651a016b098f4fa1f6279559f104d70f1632dtakashi # Install the python bindings if python is in the path
5feb3e793f498910da27b70e591fc021e378e44byoshiki if [ "`\${p} -c 'print "test"' 2> /dev/null`" = "test" ]; then
208651a016b098f4fa1f6279559f104d70f1632dtakashi echo 1>&2 "Python found: ${p}, installing bindings..."
5feb3e793f498910da27b70e591fc021e378e44byoshiki # Pass install path via environment
714c811200789fde839f46fe904db50b458afe1byoshiki /bin/sh -c "cd $VBOX_INSTALL_PATH/sdk/installer && ${p} vboxapisetup.py install 2> /dev/null"
5feb3e793f498910da27b70e591fc021e378e44byoshiki# Install the vboxweb service file for launchd
5feb3e793f498910da27b70e591fc021e378e44byoshikiVBOXWEBSRV="${VBOX_INSTALL_PATH}/org.virtualbox.vboxwebsrv.plist"
714c811200789fde839f46fe904db50b458afe1byoshikiif [[ -e "${VBOXWEBSRV}" && -e "${VBOXWEBSRV_TRG}" ]]; then
714c811200789fde839f46fe904db50b458afe1byoshiki echo "Installing vboxwebsrv launchd file to ${VBOXWEBSRV_TRG}"
208651a016b098f4fa1f6279559f104d70f1632dtakashi /usr/sbin/chown `/usr/bin/stat -f"%u" "${HOME}"` "${VBOXWEBSRV_TRG}/org.virtualbox.vboxwebsrv.plist"
5feb3e793f498910da27b70e591fc021e378e44byoshiki# Install any custom files
714c811200789fde839f46fe904db50b458afe1byoshikiDATAPATH="`/usr/bin/dirname "${0}"`/../../../../../.."
714c811200789fde839f46fe904db50b458afe1byoshikiif [ -d "${DATAPATH}/.custom" ]; then
714c811200789fde839f46fe904db50b458afe1byoshiki echo 1>&2 "Copy ${DATAPATH}/.custom to ${VBOX_INSTALL_PATH}...";
714c811200789fde839f46fe904db50b458afe1byoshiki ${CPDIR} "${DATAPATH}/.custom/" "${VBOX_INSTALL_PATH}/custom"