summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2015-08-09 20:53:59 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-08-10 18:17:20 +0200
commitc07b7837162b9800fdd0deed6f0edde351796989 (patch)
treecdf9303578b2382c1ae67e1ca48692c596955a68
parentf260f51834a8472bba72f4cb3c8af7141be1b697 (diff)
downloadcoreboot-c07b7837162b9800fdd0deed6f0edde351796989.tar.xz
genbuild_h: Actually use git's current commit for timestamp if possible
The test failed to trigger because top wasn't set. Change-Id: I96de16a1b5cbc5a64d8e65ed84fd6849dd618e8f Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/11147 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rwxr-xr-xutil/genbuild_h/genbuild_h.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/genbuild_h/genbuild_h.sh b/util/genbuild_h/genbuild_h.sh
index 0a70eb8d1e..a3e44538ab 100755
--- a/util/genbuild_h/genbuild_h.sh
+++ b/util/genbuild_h/genbuild_h.sh
@@ -26,7 +26,9 @@ export LANG=C
export LC_ALL=C
export TZ=UTC
-if [ -d "${top}/.git" ] && [ -f "$(command -v git)" ]; then
+top=`dirname $0`/../..
+
+if [ -d "${top}/.git" -a -x "$(command -v git)" ]; then
GITREV=$(LANG= git log remotes/origin/master -1 --format=format:%h)
TIMESOURCE=git
DATE=$(git log --pretty=format:%ct -1)