<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 26, 2014 at 4:25 PM, Robin Sheat <span dir="ltr"><<a href="mailto:robin@catalyst.net.nz" target="_blank">robin@catalyst.net.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Mark Tompsett schreef op wo 26-11-2014 om 15:49 [-0500]:<br>
<span class="">> QUESTION: Do all the koha command scripts need to be only sh?<br>
><br>
</span>For debian/ubuntu, except init scripts, bash is fine as it's required to<br>
be installed.<br></blockquote><div><br></div><div>My personal preference if to write the most portable code practical. As such, I'd prefer changing the prompt to "Press enter to continue.", and keep the hashbang set to #!/bin/sh, but that's more because I lean toward the old school "more portability is better" and less because I think that there's a *real* argument to be made there, given that we've already decided that debian is the standard platform for Koha... (and realistically, who *doesn't* have bash? You can run it under Windows, even).</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
For init scripts, ubuntu (last I heard) runs them under dash, which is<br>
mostly but not totally the same.<br></blockquote><div><br></div><div>dash is the Debian implementation of POSIX shell. It tends to adhere strictly to the POSIX standard. I would say that it should preferred over bash in the following cases:</div><div><br></div><div>* The script might, at some point in the future be run from /etc/init.d/</div><div>* The script itself is processor intensive - dash is faster than bash.</div><div><br></div><div>--Barton</div></div></div></div>