postflight revision 343053a42dedb94c8ef5534fff89c72384adf94d
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync# Copyright (C) 2007-2010 Oracle Corporation
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# available from http://www.virtualbox.org. This file is free software;
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# you can redistribute it and/or modify it under the terms of the GNU
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# General Public License (GPL) as published by the Free Software
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
343053a42dedb94c8ef5534fff89c72384adf94dvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync# Correct the ownership of the directories in case there
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync# was an existing installation.
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync# Select the right architecture.
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsyncfor trg in `ls /Applications/VirtualBox.app/Contents/MacOS/*-${MY_ARCH}`;
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync linkname=`echo "$trg" | sed -e 's|-'"${MY_ARCH}"'$||' `
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync# Install the Python bindings
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsyncVBOX_INSTALL_PATH=/Applications/VirtualBox.app/Contents/MacOS
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsyncif [ -e "${VBOX_INSTALL_PATH}/sdk/installer/vboxapisetup.py" ]; then
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync # Install the python bindings if python is in the path
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync if [ "`\${p} -c 'print "test"' 2> /dev/null`" = "test" ]; then
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync echo 1>&2 "Python found: ${p}, installing bindings..."
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync # Pass install path via environment
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync /bin/sh -c "cd $VBOX_INSTALL_PATH/sdk/installer && ${p} vboxapisetup.py install 2> /dev/null"
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync# Install any custom files
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsyncDATAPATH="`/usr/bin/dirname "${0}"`/../../../../../.."
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsyncif [ -d "${DATAPATH}/.custom" ]; then
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync echo 1>&2 "Copy ${DATAPATH}/.custom to ${VBOX_INSTALL_PATH}...";
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync ${CPDIR} "${DATAPATH}/.custom/" "${VBOX_INSTALL_PATH}/custom"