autogen.sh not working on Ubuntu on Windows I installed Ubuntu on Windows, then cloned https://github.com/bitcoin/bitcoin in. 

cd bitcoin
./autogen.sh


Which returned this:

: not foundh: 5: ./autogen.sh:
./autogen.sh: 6: set: Illegal option -


What am I doing wrong here? Have I missed something, or do I need to raise it as an issue on GitHub?

Thanks!

EDIT: Here is a screenshot:
This means your file has DOS newlines thus, hidden CR characters at the end.
Thus, set -e becomes set -e$'\r' (using bash-specific syntax to represent the CR character), which isn't a valid option.

To fix this, if you have dos2unix installed, you can run:
    dos2unix autogen.sh