bash: oe-init-build-env: line 33: syntax error near unexpected token `elif'
Hi,
The following commit
is causing a build error while sourcing the oe-init-build-env build script
$ cd /tool/yocto/poky;source oe-init-build-env build : command not found : command not found bash: oe-init-build-env: line 33: syntax error near unexpected token `elif' 'ash: oe-init-build-env: line 33: ` elif [ -n "$ZSH_NAME" ]; then
This is on Ubuntu 12.10 x86 64-bit.
Elvis Dowson
A message that is not in the archive (sent off-list or not yet received): CAHUNapQakOn5n3=fAHT7nBCYLU1fAiVNm52cLEn4rORGuXaFRg@mail.gmail.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 21 lines · Elvis Dowson
Quoted 4 lines · Trevor Woerner
Quoted 1 line · Elvis Dowson
Do you have a better link?
I reverted the commit, but the error still persisted. It's something else, probably due to a recent update to Ubuntu 12.10. I tried reverting to known commit ids but all of them don't work.
My shell is correctly configured to use bash instead of dash.
When I ran the debug mode for the bash shell, I found out that the
: command not found
: command not founderrors were due to the new lines on line 2 and line 20. Deleting the new lines made the : command not found errors go away, but I get the following error with the older commit
Quoted 8 lines
bash: ./oe-init-build-env: line 45: syntax error: unexpected end of file
and the following error with the current master
bash: ./oe-init-build-env: line 33: syntax error near unexpected token `elif'
'ash: ./oe-init-build-env: line 33: ` elif [ -n "$ZSH_NAME" ]; thenMan, this is so un-expected!! :-)
Okay, false alarm, sorry about that. I noticed that when I pull the latest updates, something went wrong and there were a lot of modified files after the update in red. I did a git clean -df and git reset --hard, and it solved the problem. Don't know how that happened though, but problem fixed by resetting the git repo and cleaning all the dirty files.
Best regards,
Elvis Dowson
Hi,
I think I know what happened. I briefly setup autocrlf=true in the global .gitconfig last week, and when I pull in all the latest commits, it ended up adding CRLF, and ended up causing issues. Even after disabling it, the damage already done to the local poky repository. Luckily I had backups.
This shouldn't have happened to with git!
Elvis Dowson