VirtualBox

source: vbox/trunk/src/VBox/Installer/darwin/VirtualBox/postflight@ 31655

Last change on this file since 31655 was 31655, checked in by vboxsync, 15 years ago

export darwin installer to OSE

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1#!/bin/sh
2
3#
4# Copyright (C) 2007-2010 Oracle Corporation
5#
6# Use only with permission.
7#
8
9#
10# Correct the ownership of the directories in case there
11# was an existing installation.
12#
13chown -R root:admin /Applications/VirtualBox.app
14
15#
16# Select the right architecture.
17#
18MY_ARCH=`uname -m`
19if test "$MY_ARCH" = "x86_64"; then
20 MY_ARCH="amd64"
21else
22 MY_ARCH="x86"
23fi
24set -e
25for trg in `ls /Applications/VirtualBox.app/Contents/MacOS/*-${MY_ARCH}`;
26do
27 linkname=`echo "$trg" | sed -e 's|-'"${MY_ARCH}"'$||' `
28 if test "$linkname" = "$trg"; then
29 echo "oops: $trg" 1>&2
30 exit 1;
31 fi
32 rm -f "$linkname"
33 ln -vh "$trg" "$linkname"
34done
35
36#
37# Install the Python bindings
38#
39
40VBOX_INSTALL_PATH=/Applications/VirtualBox.app/Contents/MacOS
41PYTHON="python python2.3 python2.5 python2.6"
42if [ -e "${VBOX_INSTALL_PATH}/sdk/installer/vboxapisetup.py" ]; then
43 for p in $PYTHON; do
44 # Install the python bindings if python is in the path
45 if [ "`\${p} -c 'print "test"' 2> /dev/null`" = "test" ]; then
46 echo 1>&2 "Python found: ${p}, installing bindings..."
47 # Pass install path via environment
48 export VBOX_INSTALL_PATH
49 /bin/sh -c "cd $VBOX_INSTALL_PATH/sdk/installer && ${p} vboxapisetup.py install 2> /dev/null"
50 fi
51 done
52fi
53
54#
55# Install any custom files
56#
57CP="/bin/cp -f"
58CPDIR="${CP} -R"
59DATAPATH="`/usr/bin/dirname "${0}"`/../../../../../.."
60if [ -d "${DATAPATH}/.custom" ]; then
61 echo 1>&2 "Copy ${DATAPATH}/.custom to ${VBOX_INSTALL_PATH}...";
62 ${CPDIR} "${DATAPATH}/.custom/" "${VBOX_INSTALL_PATH}/custom"
63fi
64
65exit 0;
66
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette