From e3b7472b41c43adcdd71120c0ed66cb6b775abb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Sun, 13 Dec 2020 01:53:42 -0300 Subject: [PATCH] build: only try to use git if the command is available. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index f8895d79..1a03a72c 100755 --- a/configure +++ b/configure @@ -202,7 +202,7 @@ echo "CPPFLAGS += -DXBPS_VERSION=\\\"${VERSION}\\\"" >>$CONFIG_MK echo "CPPFLAGS += -DXBPS_META_PATH=\\\"${DBDIR}\\\"" >>$CONFIG_MK echo "CPPFLAGS += -DUNUSED=\"__attribute__((__unused__))\"" >>$CONFIG_MK -if [ -d .git ]; then +if [ -d .git ] && command -v git >/dev/null; then _gitrev=$(git rev-parse --short HEAD) echo "CPPFLAGS += -DXBPS_GIT=\\\"${_gitrev}\\\"" >>$CONFIG_MK fi