Skip to content

Commit

Permalink
Fix build when using git worktree
Browse files Browse the repository at this point in the history
  • Loading branch information
reynir committed Oct 26, 2022
1 parent 4c570de commit 8aedc17
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/gen_version_h.sh
Expand Up @@ -11,8 +11,9 @@ die ()
VERSION_H="$1"

# If we are being run from a release tarball, then a version.h.distrib must
# be present, and we always use that as our source of truth.
if [ ! -d "./.git" ]; then
# be present, and we always use that as our source of truth. Allow ./.git
# to be a file to support git worktrees.
if [ ! -d "./.git" -a ! -f "./.git" ]; then
if [ ! -f "${VERSION_H}.distrib" ]; then
die "${VERSION_H}.distrib: Not found, and we are not in a Git tree"
fi
Expand Down

0 comments on commit 8aedc17

Please sign in to comment.