mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
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:
parent
1cd43a371b
commit
e174b8a800
@ -1,11 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
# Originally from the git sources (GIT-VERSION-GEN)
|
# Originally from the git sources (GIT-VERSION-GEN)
|
||||||
# Presumably (C) Junio C Hamano <junkio@cox.net>
|
# Presumably (C) Junio C Hamano <junkio@cox.net>
|
||||||
# Reused under GPL v2.0
|
# Reused under GPL v2.0
|
||||||
# Modified for fish by David Adam <zanchey@ucc.gu.uwa.edu.au>
|
# 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.
|
# 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
|
FBVF=FISH-BUILD-VERSION-FILE
|
||||||
DEF_VER=unknown
|
DEF_VER=unknown
|
||||||
|
Loading…
x
Reference in New Issue
Block a user