At 15:41 +0200 16 Apr 2018, Gero Treuner <gero-m...@innocircle.com> wrote:
On Mon, Apr 16, 2018 at 07:53:56AM -0500, Paul Keusemann wrote:
{ [ -e ".git" ] && command -v git >/dev/null 2>&1; } \
|| exec cat VERSION

does not work when run in a bourne shell.  The -e option is not supported in

I'd prefer using an option which is supported by Bourne shell. What
about "-d"?

The `.git` entry won't always be a directory. There are a few ways that it could be a file instead (`git clone --separate-git-dir` and `git worktree add` are a couple ways).

I believe that `-r` is supported by the Bourne shell as well, and should handle `.git` being either a file or a directory.

Reply via email to