Fix build on platforms without bash

Build script build_tools/git_version_gen.sh had a hard dependency on
bash that was causing the build to fail on systems without bash.

Closes #4491
This commit is contained in:
Mahmoud Al-Qudsi 2017-10-25 15:57:36 -05:00
parent 1cd43a371b
commit e174b8a800

View file

@ -1,11 +1,14 @@
#!/bin/bash
#!/bin/sh
# Originally from the git sources (GIT-VERSION-GEN)
# Presumably (C) Junio C Hamano <junkio@cox.net>
# Reused under GPL v2.0
# Modified for fish by David Adam <zanchey@ucc.gu.uwa.edu.au>
# Obtain directory containing this script in POSIX-compatible manner
# See https://stackoverflow.com/a/43919044/17027 (public domain)
a="/$0"; a="${a%/*}"; a="${a:-.}"; a="${a#/}/"; BASEDIR=$(cd "$a"; pwd)
# Find the fish git directory as two levels up from this directory.
GIT_DIR=$(dirname $(dirname "${BASH_SOURCE[0]}"))
GIT_DIR=$(dirname $(dirname "$a"))
FBVF=FISH-BUILD-VERSION-FILE
DEF_VER=unknown