Ronald Oussoren | 0e5b70d | 2006-06-07 18:58:42 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
Ronald Oussoren | 0e5b70d | 2006-06-07 18:58:42 +0000 | [diff] [blame] | 3 | PYVER="@PYVER@" |
Ned Deily | 68adfdc | 2011-02-07 16:52:25 +0000 | [diff] [blame] | 4 | FWK="/Library/Frameworks/Python.framework/Versions/${PYVER}" |
| 5 | FWK_DOCDIR_SUBPATH="Resources/English.lproj/Documentation" |
| 6 | FWK_DOCDIR="${FWK}/${FWK_DOCDIR_SUBPATH}" |
| 7 | APPDIR="/Applications/Python ${PYVER}" |
| 8 | DEV_DOCDIR="/Developer/Documentation" |
| 9 | SHARE_DIR="${FWK}/share" |
| 10 | SHARE_DOCDIR="${SHARE_DIR}/doc/python${PYVER}" |
| 11 | SHARE_DOCDIR_TO_FWK="../../.." |
Ronald Oussoren | 0e5b70d | 2006-06-07 18:58:42 +0000 | [diff] [blame] | 12 | |
Ned Deily | 68adfdc | 2011-02-07 16:52:25 +0000 | [diff] [blame] | 13 | # make link in /Developer/Documentation/ for Xcode users |
| 14 | if [ -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 Oussoren | 0e5b70d | 2006-06-07 18:58:42 +0000 | [diff] [blame] | 19 | fi |
Ned Deily | 68adfdc | 2011-02-07 16:52:25 +0000 | [diff] [blame] | 20 | |
| 21 | # make link in /Applications/Python m.n/ for Finder users |
| 22 | if [ -d "${APPDIR}" ]; then |
| 23 | ln -fhs "${FWK_DOCDIR}/index.html" "${APPDIR}/Python Documentation.html" |
| 24 | fi |
| 25 | |
| 26 | # make share/doc link in framework for command line users |
| 27 | if [ -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" |
| 31 | fi |
| 32 | |