fixed shebang
use cat + heredocs instead of echo
call the scripts with sh so they don't need the executable bit