postflight revision fb27aa740466280f820e13e238bc6dd0b477eb37
1233N/A#!/bin/sh
550N/A
550N/A#
919N/A# Copyright (C) 2007-2010 Oracle Corporation
919N/A#
919N/A# Use only with permission.
919N/A#
919N/A
919N/A#
919N/A# Correct the ownership of the directories in case there
919N/A# was an existing installation.
919N/A#
919N/Achown -R root:admin /Applications/VirtualBox.app
919N/A
919N/A#
919N/A# Select the right architecture.
919N/A#
919N/AMY_ARCH=`uname -m`
919N/Aif test "$MY_ARCH" = "x86_64"; then
919N/A MY_ARCH="amd64"
550N/Aelse
550N/A MY_ARCH="x86"
550N/Afi
550N/Aset -e
550N/Afor trg in `ls /Applications/VirtualBox.app/Contents/MacOS/*-${MY_ARCH}`;
550N/Ado
550N/A linkname=`echo "$trg" | sed -e 's|-'"${MY_ARCH}"'$||' `
1233N/A if test "$linkname" = "$trg"; then
1233N/A echo "oops: $trg" 1>&2
1233N/A exit 1;
1233N/A fi
550N/A rm -f "$linkname"
550N/A ln -vh "$trg" "$linkname"
851N/Adone
851N/A
#
# Install the Python bindings
#
VBOX_INSTALL_PATH=/Applications/VirtualBox.app/Contents/MacOS
PYTHON="python python2.3 python2.5 python2.6"
if [ -e "${VBOX_INSTALL_PATH}/sdk/installer/vboxapisetup.py" ]; then
for p in $PYTHON; do
# Install the python bindings if python is in the path
if [ "`\${p} -c 'print "test"' 2> /dev/null`" = "test" ]; then
echo 1>&2 "Python found: ${p}, installing bindings..."
# Pass install path via environment
export VBOX_INSTALL_PATH
/bin/sh -c "cd $VBOX_INSTALL_PATH/sdk/installer && ${p} vboxapisetup.py install 2> /dev/null"
fi
done
fi
#
# Install any custom files
#
CP="/bin/cp -f"
CPDIR="${CP} -R"
DATAPATH="`/usr/bin/dirname "${0}"`/../../../../../.."
if [ -d "${DATAPATH}/.custom" ]; then
echo 1>&2 "Copy ${DATAPATH}/.custom to ${VBOX_INSTALL_PATH}...";
${CPDIR} "${DATAPATH}/.custom/" "${VBOX_INSTALL_PATH}/custom"
fi
exit 0;