Repository: comonicon/Comonicon.jl (julia)

Issue:
"Bad substitution error" when using other shell than bash
With version 0.12, I get a `Bad substitution` error when trying to use scripts generated by Comonicon. 
The problem is fixed when I specifically use bash to call the script, *i.e.* calling  `treeknit --help` results in an error, whereas calling `bash treeknit --help` works just fine (the package I try this on is https://github.com/PierreBarrat/TreeKnit.jl). 
When downgrading to v0.11.7, there is no error at all. 

I think the reason is that since v0.12, Tthe script generated by Comonicon in `~/.julia/bin` uses `${BASH_SOURCE[0]}` (as recommended in the main docs of the julia language), but uses `#!/usr/bin/env sh` as a shebang.  
But on Ubuntu, `/bin/sh` points to `dash` (at least on me and my colleagues machines...). Hence the error.

Pull request description:
fix #161

Patch:
diff --git a/src/builder/install.jl b/src/builder/install.jl
index 52f2cc35..33dc08b5 100644
--- a/src/builder/install.jl
+++ b/src/builder/install.jl
@@ -107,7 +107,7 @@ function entryfile_script(m::Module, options::Options.Comonicon)
     push!(cmds, "-- \"\${BASH_SOURCE[0]}\" \"\$@\"")
 
     return """
-    #!/usr/bin/env sh
+    #!/usr/bin/env bash
     #=
     JULIA_PROJECT=$(get_scratch!(m, "env")) \\
     exec $(join(cmds, " \\\n    "))


Test patch:
diff --git a/test/builder/install.jl b/test/builder/install.jl
index 3a5f7548..8c74ebff 100644
--- a/test/builder/install.jl
+++ b/test/builder/install.jl
@@ -27,7 +27,7 @@ end
     options = Options.Comonicon(name = "test")
     script = entryfile_script(TestInstall, options)
 
-    @test occursin("#!/usr/bin/env sh", script)
+    @test occursin("#!/usr/bin/env bash", script)
     @test occursin("JULIA_PROJECT=$(get_scratch!(TestInstall, "env"))", script)
     julia_exe = joinpath(Sys.BINDIR, Base.julia_exename())
     @test occursin("exec $julia_exe \\\n", script)