[43946] trunk/base/portmgr/dmg/postflight
blb at macports.org
blb at macports.org
Wed Dec 17 20:47:48 PST 2008
Revision: 43946
http://trac.macports.org/changeset/43946
Author: blb at macports.org
Date: 2008-12-17 20:47:48 -0800 (Wed, 17 Dec 2008)
Log Message:
-----------
postflight - better handle tcsh (.tcshrc and .cshrc) and bash (.bash_profile,
.bash_login, and .profile) login files; ticket #17588
Modified Paths:
--------------
trunk/base/portmgr/dmg/postflight
Modified: trunk/base/portmgr/dmg/postflight
===================================================================
--- trunk/base/portmgr/dmg/postflight 2008-12-18 04:18:51 UTC (rev 43945)
+++ trunk/base/portmgr/dmg/postflight 2008-12-18 04:47:48 UTC (rev 43946)
@@ -116,14 +116,26 @@
LOGIN_FLAG=""
ENV_COMMAND="setenv"
ASSIGN=" "
- CONF_FILE=tcshrc
+ if [ -f ${HOME}/.tcshrc ]; then
+ CONF_FILE=tcshrc
+ elif [ -f ${HOME}/.cshrc ]; then
+ CONF_FILE=cshrc
+ else
+ CONF_FILE=tcshrc
+ fi
;;
bash)
echo "Detected the bash shell."
LOGIN_FLAG="-l"
ENV_COMMAND="export"
ASSIGN="="
- CONF_FILE=profile
+ if [ -f ${HOME}/.bash_profile ]; then
+ CONF_FILE=bash_profile
+ elif [ -f ${HOME}/.bash_login ]; then
+ CONF_FILE=bash_login
+ else
+ CONF_FILE=profile
+ fi
;;
*)
echo "Unknown shell ($USHELL)! Please set your MacPorts compatible environment manually."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081217/9a68f0d9/attachment.html>
More information about the macports-changes
mailing list