blob: 30d2ee527ba045c1b638ffc1793314e96887a359 [file] [log] [blame]
Ronald Oussoren0e5b70d2006-06-07 18:58:42 +00001#!/bin/sh
2
Ronald Oussoren0e5b70d2006-06-07 18:58:42 +00003PYVER="@PYVER@"
Ned Deily68adfdc2011-02-07 16:52:25 +00004FWK="/Library/Frameworks/Python.framework/Versions/${PYVER}"
5FWK_DOCDIR_SUBPATH="Resources/English.lproj/Documentation"
6FWK_DOCDIR="${FWK}/${FWK_DOCDIR_SUBPATH}"
7APPDIR="/Applications/Python ${PYVER}"
8DEV_DOCDIR="/Developer/Documentation"
9SHARE_DIR="${FWK}/share"
10SHARE_DOCDIR="${SHARE_DIR}/doc/python${PYVER}"
11SHARE_DOCDIR_TO_FWK="../../.."
Ronald Oussoren0e5b70d2006-06-07 18:58:42 +000012
Ned Deily68adfdc2011-02-07 16:52:25 +000013# make link in /Developer/Documentation/ for Xcode users
14if [ -d "${DEV_DOCDIR}" ]; then
15 if [ ! -d "${DEV_DOCDIR}/Python" ]; then
16 mkdir -p "${DEV_DOCDIR}/Python"
17 fi
18 ln -fhs "${FWK_DOCDIR}" "${DEV_DOCDIR}/Python/Reference Documentation ${PYVER}"
Ronald Oussoren0e5b70d2006-06-07 18:58:42 +000019fi
Ned Deily68adfdc2011-02-07 16:52:25 +000020
21# make link in /Applications/Python m.n/ for Finder users
22if [ -d "${APPDIR}" ]; then
23 ln -fhs "${FWK_DOCDIR}/index.html" "${APPDIR}/Python Documentation.html"
24fi
25
26# make share/doc link in framework for command line users
27if [ -d "${SHARE_DIR}" ]; then
28 mkdir -p "${SHARE_DOCDIR}"
29 # make relative link to html doc directory
30 ln -s "${SHARE_DOCDIR_TO_FWK}/${FWK_DOCDIR_SUBPATH}" "${SHARE_DOCDIR}/html"
31fi
32