Here's a script which automatically roots an Android (2.1) phone and then installs bash with some helper scripts.
It must be run from Linux because the installer is an .sh script. It has been tested on my Sony Ericsson X10 mini.
Unzip the RootAndBash.zip file
Run the file: pushAndInstallToDevice.sh
Wait for it to complete.
Connect to a shell on your Android device, via a terminal emulator or using adb:
Run "sb", the helper script to get Root Bash:
The script will make you root and configure /system filesystem to be writable and start bash.