Bash 2.04 works in MacOS X ... here's how

Zesty

Registered
Hey all-

In keeping with trying to get everything gnu to work with MacOS X, bash version 2.04 works with OSX. Here's how to build it:

go to ftp.gnu.org and grab the tar sources of bash-2.04 (bash-204.tar.gz). do the standard unzipping and tarring

in the directory it creates, run:

./configure --host=ppc-netbsd --without-gnu-malloc

this will run the configuration script and configure the sources. then run:

make

wait for it to compile (takes about 5 minutes on a single g4 450)

then run

make install

this will copy bash to /usr/local/bin. If you want to make this your default shell, go to netinfomanager and navigate to users/<username> and change the shell to /usr/local/bin/bash

That's it!

 

The DJ

Registered
Originally posted by Zesty
In keeping with trying to get everything gnu to work with MacOS X, bash version 2.04 works with OSX.
I already have a precompiled version with an installscript (BTW use /usr/libexec/config.guess and you will not need the extra flags. Copy the file into the source dir).
Get it here on my Homepage. The part on making bash your default shell still applies, even on my distro.
 

synaptojanin

Registered
thanks for the precompiled binary! I couldn't get the bash source to compile since I haven't installed the developer tools yet.

Where do the config files reside (.bash_profile, .bash_login)? I really want to edit my prompt...

[Edited by synaptojanin on 10-06-2000 at 10:40 AM]
 

ajmas

Registered
One thing you guys might want to do is write up a small MacOSX.Readme and submit it to the maintainers of bash so they can include it in the next verion.
 

The DJ

Registered
Originally posted by synaptojanin

Where do the config files reside (.bash_profile, .bash_login)? I really want to edit my prompt...
Normally you put .bashrc in your home dir or .login in your homedir. Read the manual too. You can exit it by typing man bash.

But i understand after receiving some mail that that might not work.
This is my answer to the mail
-----------------------------------
I thought it ought to work this way. Those paths (./bashrc and .login) are hardcoded into the binary. So installing should have nothing to do with it.

Try the following. In Terminal you can set a "use startup file" option in the preferences (under shell).
Maybe this will read. ~/.bashrc or ~/.profile file. Ooh, i think you have to specify the file in the Terminal startup preference.

And i think it will be read automatic if you change your default shell.
Do that by opening the NetInfoManager in your utilities folder and select users and the user you wish to change. (You have to unlock NIM first.) Now there should be a property to change your shell. to /usr/local/bin/bash or /bin/bash. Forgot which one i used.
-----------------------------
I will try it out myself when i get the chance.
I'm still a bit busy with Samba
 

The DJ

Registered
I think i figured it out.

Make sure the "use startup file" option in the preferences of Terminal (under shell option) is not checked.
Now it will read. first /etc/profile and then the ~/.bashrc or ~/.profile file.

Anything else is not needed.

I will edit it in the Manual.
DJ
 

synaptojanin

Registered
Try the following. In Terminal you can set a "use startup file" option in the preferences (under shell).
Maybe this will read. ~/.bashrc or ~/.profile file. Ooh, i think you have to specify the file in the Terminal startup preference.
The DJ -

Thanks for your help. Yes indeed this works. Oddly, bash in OS X does *NOT* read .bashrc as stated in the man pages. In fact, it ignores it.

It does however, read .profile. For configuring tcsh, a the .tcshrc is sufficient.

 

synaptojanin

Registered
whoops - missed your post. Okay. that makes sense. Testing reveals that if the read startup file is checked, it then looks for a .profile. If it is unchecked, it jsut reads .bashrc.

Thanks again.
 

vinglot

Registered
create /etc/profile with the line
. ~/.bashrc

and any other global shell stuff for all users (like path info)

I had no problem compiling.

Jonathan
 
Top