[43948] branches/release_1_7

blb at macports.org blb at macports.org
Wed Dec 17 20:51:34 PST 2008


Revision: 43948
          http://trac.macports.org/changeset/43948
Author:   blb at macports.org
Date:     2008-12-17 20:51:33 -0800 (Wed, 17 Dec 2008)
Log Message:
-----------
postflight - merge r43946 from trunk: better handle tcsh (.tcshrc and .cshrc)
and bash (.bash_profile, .bash_login, and .profile) login files; ticket #17588

Modified Paths:
--------------
    branches/release_1_7/base/portmgr/dmg/postflight

Property Changed:
----------------
    branches/release_1_7/


Property changes on: branches/release_1_7
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk:42683,42697,42734,42747,42760,42845-42847,42865,42962,42978,43001,43080,43083,43097,43140,43153,43194,43216-43217,43229,43704-43705,43733
   + /trunk:42683,42697,42734,42747,42760,42845-42847,42865,42962,42978,43001,43080,43083,43097,43140,43153,43194,43216-43217,43229,43704-43705,43733,43946

Modified: branches/release_1_7/base/portmgr/dmg/postflight
===================================================================
--- branches/release_1_7/base/portmgr/dmg/postflight	2008-12-18 04:51:26 UTC (rev 43947)
+++ branches/release_1_7/base/portmgr/dmg/postflight	2008-12-18 04:51:33 UTC (rev 43948)
@@ -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/9a9b7991/attachment.html>


More information about the macports-changes mailing list