1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-10 16:58:28 +03:00

meson: avoid error message if git is not installed

[1/9] Generating version.h with a custom command
/home/zbyszek/src/systemd/tools/vcs-tag.sh: line 17: git: command not found

If git is not available, do not try to call it.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2024-12-05 12:39:04 +01:00 committed by Luca Boccassi
parent 900ac3a76a
commit 40238aeee2

View File

@ -4,7 +4,10 @@ set -e
MODE="$1"
if ! [[ -d .git ]] || git describe --tags --exact-match &>/dev/null; then
if ! [[ -d .git ]] ||
! command -v git >/dev/null ||
git describe --tags --exact-match &>/dev/null
then
exit 0
fi