I am running a shell script "envsetup.sh" and I keep getting the following error.
Badly placed ()'s
I found out the error is because I am not in a bash shell environment. Can anyone help explain how to enter the bash
shell environment?
I am running a shell script "envsetup.sh" and I keep getting the following error.
Badly placed ()'s
I found out the error is because I am not in a bash shell environment. Can anyone help explain how to enter the bash
shell environment?
Try putting the line:
as the first line of your script. I am assuming the bash command file is in /bin - if not have a look for where it is located and use that path instead.
to run a single script
envsetup.sh
inbash
, invoke it like this:To switch to a
bash
login shell (which reads profiles etc), you should type:The
-l
option indicates that it should be a login shell. You can then read theenvsetup.sh
file using:You may be able to use the
chsh
command to change your login shell permanently using a line such as:Just make sure the name you specify is the correct path to your copy of
bash
.Assuming you are trying to compile Android, you can do the following to temporarily use bash: