blob: 3cbbc1bf10ca2a5af343fd62be3987a4aef95d39 [file] [log] [blame]
Thomas Wouters477c8d52006-05-27 19:21:47 +00001#!/bin/sh
2
Thomas Wouters477c8d52006-05-27 19:21:47 +00003PYVER="@PYVER@"
Ned Deilyda397902011-02-07 16:48:28 +00004FWK="/Library/Frameworks/Python.framework/Versions/${PYVER}"
5FWK_DOCDIR_SUBPATH="Resources/English.lproj/Documentation"
6FWK_DOCDIR="${FWK}/${FWK_DOCDIR_SUBPATH}"
7APPDIR="/Applications/Python ${PYVER}"
Ned Deilyda397902011-02-07 16:48:28 +00008SHARE_DIR="${FWK}/share"
9SHARE_DOCDIR="${SHARE_DIR}/doc/python${PYVER}"
10SHARE_DOCDIR_TO_FWK="../../.."
Thomas Wouters477c8d52006-05-27 19:21:47 +000011
Ned Deilyda397902011-02-07 16:48:28 +000012# make link in /Applications/Python m.n/ for Finder users
13if [ -d "${APPDIR}" ]; then
14 ln -fhs "${FWK_DOCDIR}/index.html" "${APPDIR}/Python Documentation.html"
Ned Deilycc5ac042018-02-27 17:39:50 -050015 open "${APPDIR}" || true # open the applications folder
Ned Deilyda397902011-02-07 16:48:28 +000016fi
17
18# make share/doc link in framework for command line users
19if [ -d "${SHARE_DIR}" ]; then
Ned Deily6214d492013-02-01 13:59:42 -080020 mkdir -m 775 -p "${SHARE_DOCDIR}"
Ned Deilyda397902011-02-07 16:48:28 +000021 # make relative link to html doc directory
Ned Deilya16b05b2011-02-21 20:52:58 +000022 ln -fhs "${SHARE_DOCDIR_TO_FWK}/${FWK_DOCDIR_SUBPATH}" "${SHARE_DOCDIR}/html"
Ned Deilyda397902011-02-07 16:48:28 +000023fi
24