annotate Mac/BuildScript/scripts/postflight.documentation @ 67902:bb757facbfa6 2.7

Issue #11079: The /Applications/Python x.x folder created by the Mac OS X installers now includes a link to the installed documentation.
author Ned Deily <nad@acm.org>
date Mon, 07 Feb 2011 16:52:25 +0000
parents b9d3301e5f19
children 284026e00342
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38252
75bdd44f85dc An improved script for building the binary distribution on MacOSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
1 #!/bin/sh
75bdd44f85dc An improved script for building the binary distribution on MacOSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
2
75bdd44f85dc An improved script for building the binary distribution on MacOSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
3 PYVER="@PYVER@"
67902
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
4 FWK="/Library/Frameworks/Python.framework/Versions/${PYVER}"
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
5 FWK_DOCDIR_SUBPATH="Resources/English.lproj/Documentation"
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
6 FWK_DOCDIR="${FWK}/${FWK_DOCDIR_SUBPATH}"
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
7 APPDIR="/Applications/Python ${PYVER}"
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
8 DEV_DOCDIR="/Developer/Documentation"
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
9 SHARE_DIR="${FWK}/share"
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
10 SHARE_DOCDIR="${SHARE_DIR}/doc/python${PYVER}"
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
11 SHARE_DOCDIR_TO_FWK="../../.."
38252
75bdd44f85dc An improved script for building the binary distribution on MacOSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
12
67902
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
13 # make link in /Developer/Documentation/ for Xcode users
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
14 if [ -d "${DEV_DOCDIR}" ]; then
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
15 if [ ! -d "${DEV_DOCDIR}/Python" ]; then
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
16 mkdir -p "${DEV_DOCDIR}/Python"
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
17 fi
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
18 ln -fhs "${FWK_DOCDIR}" "${DEV_DOCDIR}/Python/Reference Documentation ${PYVER}"
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
19 fi
38252
75bdd44f85dc An improved script for building the binary distribution on MacOSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
20
67902
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
21 # make link in /Applications/Python m.n/ for Finder users
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
22 if [ -d "${APPDIR}" ]; then
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
23 ln -fhs "${FWK_DOCDIR}/index.html" "${APPDIR}/Python Documentation.html"
38252
75bdd44f85dc An improved script for building the binary distribution on MacOSX.
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff changeset
24 fi
67902
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
25
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
26 # make share/doc link in framework for command line users
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
27 if [ -d "${SHARE_DIR}" ]; then
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
28 mkdir -p "${SHARE_DOCDIR}"
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
29 # make relative link to html doc directory
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
30 ln -s "${SHARE_DOCDIR_TO_FWK}/${FWK_DOCDIR_SUBPATH}" "${SHARE_DOCDIR}/html"
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
31 fi
bb757facbfa6 Issue #11079: The /Applications/Python x.x folder created by the Mac
Ned Deily <nad@acm.org>
parents: 40049
diff changeset
32