When using bash, the whitespaces before the delimiting identifier `EOF` cause an error as well as a missing `\` before `$`.
This makes it easier to be consistent. Also replace "<<-EOF" by "<<EOF", since the former only does trims tabs, not spaces.