~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to support-files/MacOSX/preflight.sh

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
# preflight - this script will be executed before the MySQL PKG
 
4
# installation will be performed.
 
5
#
 
6
# If this package has been compiled with a prefix ending with "mysql" (e.g.
 
7
# /usr/local/mysql or /opt/mysql), it will rename any previously existing
 
8
# directory with this name before installing the new package (which includes
 
9
# a symlink named "mysql", pointing to the newly installed directory, which
 
10
# is named mysql-<version>)
 
11
#
 
12
 
 
13
PREFIX="@prefix@"
 
14
BASENAME=`basename $PREFIX`
 
15
 
 
16
if [ -d $PREFIX -a ! -L $PREFIX -a $BASENAME = "mysql" ] ; then
 
17
        mv $PREFIX $PREFIX.bak
 
18
fi