From: Zbigniew Jędrzejewski-Szmek Date: Thu, 5 Dec 2024 11:39:04 +0000 (+0100) Subject: meson: avoid error message if git is not installed X-Git-Tag: v257~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=40238aeee2b7e67daf4a701791eae5149ffec080;p=thirdparty%2Fsystemd.git 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. --- diff --git a/tools/vcs-tag.sh b/tools/vcs-tag.sh index 5da39cc5396..0150d0b50e1 100755 --- a/tools/vcs-tag.sh +++ b/tools/vcs-tag.sh @@ -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