Skip to content

Commit e600e47

Browse files
committed
Fix version.sh when calling meson outside the source repository
This happens for the Arch Linux package, for example.
1 parent d1acdbf commit e600e47

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/version.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ osx_bundle_sed_path="${builddir}/osx-bundle.sed"
4242
last_svn_revision=6962
4343
last_svn_hash="16cd907fe7482cb54a7374cd28b8501f138116be"
4444

45+
git() {
46+
command git -C "$srcdir" "$@"
47+
}
48+
4549
# Check if the commit exists first, it doesn't exist in shallow clones.
4650
if [ "$(git cat-file -t $last_svn_hash 2> /dev/null)" = "commit" ]; then
4751
git_revision=$(expr $last_svn_revision + $(git rev-list --count $last_svn_hash..HEAD))

0 commit comments

Comments
 (0)