aboutsummaryrefslogtreecommitdiff
path: root/Mac
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2006-10-08 18:18:26 +0000
committerRonald Oussoren <ronaldoussoren@mac.com>2006-10-08 18:18:26 +0000
commitb80b6e1e12b2697a2d25d00992e9ebddc3b7326e (patch)
tree8992ad2160063fd66924cfac8c29c03b0ea04e6e /Mac
parentMacOSX: The universal build requires that users have the MacOSX10.4u SDK (diff)
downloadcpython-b80b6e1e12b2697a2d25d00992e9ebddc3b7326e.tar.gz
cpython-b80b6e1e12b2697a2d25d00992e9ebddc3b7326e.tar.bz2
cpython-b80b6e1e12b2697a2d25d00992e9ebddc3b7326e.zip
MacOSX: add more logic to recognize the correct startup file to patch to the
shell profile patching post-install script.
Diffstat (limited to 'Mac')
-rwxr-xr-xMac/BuildScript/scripts/postflight.patch-profile21
1 files changed, 14 insertions, 7 deletions
diff --git a/Mac/BuildScript/scripts/postflight.patch-profile b/Mac/BuildScript/scripts/postflight.patch-profile
index c42e11e31b6..5e82f331cfa 100755
--- a/Mac/BuildScript/scripts/postflight.patch-profile
+++ b/Mac/BuildScript/scripts/postflight.patch-profile
@@ -47,22 +47,29 @@ done
echo "${PYTHON_ROOT}/bin is not on your PATH or at least not early enough"
case "${BSH}" in
*csh)
+ if [ -f "${HOME}/.tcshrc" ]; then
+ RC="${HOME}/.tcshrc"
+ else
+ RC="${HOME}/.cshrc"
+ fi
# Create backup copy before patching
- if [ -f "${HOME}/.cshrc" ]; then
- cp -fp "${HOME}/.cshrc" "${HOME}/.cshrc.pysave"
+ if [ -f "${RC}" ]; then
+ cp -fp "${RC}" "${RC}.pysave"
fi
- echo "" >> "${HOME}/.cshrc"
- echo "# Setting PATH for MacPython ${PYVER}" >> "${HOME}/.cshrc"
- echo "# The orginal version is saved in .cshrc.pysave" >> "${HOME}/.cshrc"
- echo "set path=(${PYTHON_ROOT}/bin "'$path'")" >> "${HOME}/.cshrc"
+ echo "" >> "${RC}"
+ echo "# Setting PATH for MacPython ${PYVER}" >> "${RC}"
+ echo "# The orginal version is saved in .cshrc.pysave" >> "${RC}"
+ echo "set path=(${PYTHON_ROOT}/bin "'$path'")" >> "${RC}"
if [ `id -ur` = 0 ]; then
- chown "${USER}" "${HOME}/.cshrc"
+ chown "${USER}" "${RC}"
fi
exit 0
;;
bash)
if [ -e "${HOME}/.bash_profile" ]; then
PR="${HOME}/.bash_profile"
+ elif [ -e "${HOME}/.bash_login" ]; then
+ PR="${HOME}/.bash_login"
elif [ -e "${HOME}/.profile" ]; then
PR="${HOME}/.profile"
else