postflight revision fb27aa740466280f820e13e238bc6dd0b477eb37
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync# Copyright (C) 2007-2010 Oracle Corporation
fb27aa740466280f820e13e238bc6dd0b477eb37vboxsync# Use only with permission.
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"