Open gitblit opened 9 years ago
I'm not opposed to this idea, but I don't currently plan to change it. I'm not expert
enough on all the variations in shell syntax. I'm sure "." is available in most if
not all shells, but what about conditionals and switches? Is that the same between
bash, csh, zsh, fish, etc, etc? I'm not totally sure.
Reported by James.Moger
on 2015-02-26 14:17:27
well, /bin/sh on all systems I know is either ash, ksh, bash or dash (all sh compatible).
If it would be a shell with non-sh-like syntax even the boot-process would fail as
it does depends massively on sh scripts. E.g. look at /etc/init.d on Ubuntu. Most of
these scripts using /bin/sh (= dash on ubuntu) as interpreter.
for a overview on what's defined in the sh language, look here:
http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html
TL;DR: Most syntatic features from bash are available in sh, with a few differences
like substrings in variables, etc. Nothing you would probably need in an init script.
Another option would be to use #!/usr/bin/env bash - which, while not POSIX compliant,
works on every half-way modern unix system and calls the bash from their correct path
(e.g. on FreeBSD /usr/local/bin/bash, if installed from ports).
Reported by oliverkett
on 2015-03-02 14:49:19
Originally reported on Google Code with ID 554
Reported by
oliverkett
on 2015-01-29 20:53:04