Robert T Wyatt wrote:
Dave Vasilevsky wrote:
It looks like you don't have Fink installed, so you need to bootstrap not inject. If you do have Fink installed, then you haven't done
'. /sw/bin/init.sh' or the equivalent, so perl doesn't know about your Fink
installation.

Since I added a .bash_login file for the Ruby on Rails tutorial, my .profile file was being ignored. (My .profile is where 'test -r /sw/bin/init.sh && . /sw/bin/init.sh' resides.)

I've done some poking around and have found that I have two questions as follow.

You are probably at least vaguely familiar with this from man bash:

When  bash is invoked as an interactive login shell, or as a non-inter-
active shell with the --login option, it first reads and executes  com-
mands  from the file /sw/etc/profile, if that file exists.  After read-
ing that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.pro-
file, in that order, and reads and executes commands from the first one
that exists and is readable.

So I checked out /sw/etc/profile:

$ cat /sw/etc/profile
source /sw/share/init/bash/profile

... which looks to me like it is intended to invoke this script (which I don't quite understand):

$ cat /sw/share/init/bash/profile
##
# Set path
##

export PATH="${HOME}/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
export MANPATH="${HOME}/man:/usr/local/share/man:/usr/share/man"

##
# Read user's .profile
##
     default_initdir=/sw/share/init
default_bash_initdir=${default_initdir}/bash
        user_initdir=~/Library/init
   user_bash_initdir=${user_initdir}/bash

if [ -r ${user_bash_initdir} ]; then
       initdir=${user_initdir}
  bash_initdir=${user_bash_initdir}
else
       initdir=${default_initdir}
  bash_initdir=${default_bash_initdir}
fi

if [ -r ${bash_initdir}/profile.mine ]; then
  source ${bash_initdir}/profile.mine
fi

# Local Variables:
# mode:shell-script
# sh-shell:bash
# End:

Am I mistaken that /sw/etc/profile ought to use "." instead of "source" in this case (since bash is the default shell)? Or maybe it is only intended to work for tcsh?

I'm not sure what the second script is intended to do, but I think it's supposed to find the user's .profile. If so, I would expect that I should have been able to use ~/.bash_profile AND have ~/.profile read if /sw/etc/profile worked the way I think it is intended. Is this even close to being correct?

Thanks,
Robert



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to