mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-24 10:02:29 +01:00
0e8d2e4eeb
Fixes build failure on -current. Signed-off-by: David Spencer <baildon.research@googlemail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
25 lines
844 B
Diff
25 lines
844 B
Diff
From 2f32a9debc1f148b5dfcfc463480f1432bb71725 Mon Sep 17 00:00:00 2001
|
|
From: Lars Op den Kamp <lars@opdenkamp.eu>
|
|
Date: Sat, 11 Jul 2015 00:53:17 +0200
|
|
Subject: [PATCH] fixed: don't generate an invalid env.h when not built with
|
|
the .git dir present. closes #112
|
|
|
|
---
|
|
support/git-rev.sh | 7 +++++--
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/support/git-rev.sh b/support/git-rev.sh
|
|
index 5dce3d0..4aadae6 100755
|
|
--- a/support/git-rev.sh
|
|
+++ b/support/git-rev.sh
|
|
@@ -1,5 +1,8 @@
|
|
#!/bin/sh
|
|
|
|
## cmake doesn't read the variable when it doesn't end with a newline, and I haven't figured out how to have it add a newline directly...
|
|
-echo -n "`git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h"`\n"
|
|
-
|
|
+if [ -d .git ]; then
|
|
+ echo "`git --no-pager log --abbrev=7 -n 1 --pretty=format:"%h"`"
|
|
+else
|
|
+ echo "<unknown>"
|
|
+fi
|