From 7aa9df87554d57372b5c13897413abb6ae8e61e5 Mon Sep 17 00:00:00 2001 From: midipix Date: Dec 25 2018 10:37:11 +0000 Subject: build system: version.sh: silence git errors with a non-git source tree. --- diff --git a/sysinfo/version.sh b/sysinfo/version.sh index 6cbdc12..f510a32 100755 --- a/sysinfo/version.sh +++ b/sysinfo/version.sh @@ -53,8 +53,8 @@ fi cd "$srcdir" -gitver=$(git rev-parse --verify HEAD 2>/dev/null) || gitver="unknown" -cvdate=$(git show -s --format=%ci $gitver) || cvdate=$(date) +gitver=$(git rev-parse --verify HEAD 2>/dev/null) || gitver="unknown" +cvdate=$(git show -s --format=%ci $gitver 2>/dev/null) || cvdate=$(date) vmacro=$(printf '%s' "$prefix"'_GIT_VERSION' | tr '[:lower:]' '[:upper:]') dmacro=$(printf '%s' "$prefix"'_GIT_DATE ' | tr '[:lower:]' '[:upper:]')