[33591] branches/release_1_6/base/portmgr/dmg/postflight
jmpp at macports.org
jmpp at macports.org
Wed Jan 30 22:36:52 PST 2008
Revision: 33591
http://trac.macosforge.org/projects/macports/changeset/33591
Author: jmpp at macports.org
Date: 2008-01-30 22:36:50 -0800 (Wed, 30 Jan 2008)
Log Message:
-----------
Seems like the source of all my pains is Installer.app, which aparently limits the environment I run under in some way
and forces SHELL to /bin/sh always (even if I run as a login shell, it just doesn't seem to be possible to get to the
user's info), rendering useless the `case` routine that tries to determine the shell I need to tweak.
As a lame workaround, I'm going to glob for *sh to match /bin/sh and thus still write my settings to the common profile file,
leaving all those *csh users out there a bit in dispair.
Modified Paths:
--------------
branches/release_1_6/base/portmgr/dmg/postflight
Modified: branches/release_1_6/base/portmgr/dmg/postflight
===================================================================
--- branches/release_1_6/base/portmgr/dmg/postflight 2008-01-31 04:08:04 UTC (rev 33590)
+++ branches/release_1_6/base/portmgr/dmg/postflight 2008-01-31 06:36:50 UTC (rev 33591)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -l
# -*- coding: utf-8; mode: shell-script-mode; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=sh:et:sw=4:ts=4:sts=4
#
# Copyright (c) 2002-2007 Juan Manuel Palacios <jmpp at macports.org>, The MacPorts Project.
@@ -32,7 +32,7 @@
# $Id$
-set -x
+#set -x
# Script identification ('cause more often than not the svn Id is not expanded):
VERSION=1.6.1
@@ -90,20 +90,22 @@
exit 1
}
case "${USHELL}" in
- tcsh)
+ *csh)
LOGIN_FLAG=""
ENV_COMMAND="setenv"
ASSIGN=" "
- CONF_FILE=tcshrc
+ CONF_FILE=cshrc
+ echo "Configuring a csh based shell."
;;
- bash)
+ *sh)
LOGIN_FLAG="-l"
ENV_COMMAND="export"
ASSIGN="="
CONF_FILE=profile
+ echo "Configuring a bourne based shell."
;;
*)
- echo "Unknown shell! Please set your MacPorts compatible environment manually."
+ echo "Unsupported shell ($USHELL)! Please set your MacPorts compatible environment manually."
update_macports
exit 0
;;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080130/fa4d0925/attachment.html
More information about the macports-changes
mailing list