[coreboot-gerrit] New patch to review for coreboot: b42b625 genbuild_h: refactor environment variable into export's

Alexander Couzens (lynxis@fe80.eu) gerrit at coreboot.org
Sun Jun 7 02:12:57 CEST 2015


Alexander Couzens (lynxis at fe80.eu) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10448

-gerrit

commit b42b6259c274bf64c542049345f1dfc7cd33a336
Author: Alexander Couzens <lynxis at fe80.eu>
Date:   Sun Jun 7 02:07:34 2015 +0200

    genbuild_h: refactor environment variable into export's
    
    Change-Id: Ife3fb0c86fbd065fe9957bbc79b4dd1391f930b2
    Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
 util/genbuild_h/genbuild_h.sh | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/util/genbuild_h/genbuild_h.sh b/util/genbuild_h/genbuild_h.sh
index 3d25276..84aad7d 100755
--- a/util/genbuild_h/genbuild_h.sh
+++ b/util/genbuild_h/genbuild_h.sh
@@ -21,6 +21,10 @@
 DATE=""
 GITREV=""
 TIMESOURCE=""
+
+export LANG=C
+export TZ=UTC
+
 if [ -d "${top}/.git" ] && [ -f "$(command -v git)" ]; then
 	GITREV=$(LANG= git log remotes/origin/master -1 --format=format:%h)
 	TIMESOURCE=git
@@ -34,10 +38,10 @@ fi
 our_date() {
 case $(uname) in
 NetBSD|OpenBSD|DragonFly|FreeBSD)
-	TZ=UTC date -r $1 $2
+	date -r $1 $2
 	;;
 *)
-	TZ=UTC date -d @$1 $2
+	date -d @$1 $2
 esac
 }
 
@@ -53,7 +57,7 @@ printf "#define COREBOOT_VERSION_TIMESTAMP $DATE\n"
 printf "#define COREBOOT_ORIGIN_GIT_REVISION \"$GITREV\"\n"
 
 printf "#define COREBOOT_EXTRA_VERSION \"%s\"\n" "$COREBOOT_EXTRA_VERSION"
-printf "#define COREBOOT_BUILD \"$(LANG= our_date "$DATE")\"\n"
+printf "#define COREBOOT_BUILD \"$(our_date "$DATE")\"\n"
 printf "#define COREBOOT_BUILD_YEAR_BCD 0x$(our_date "$DATE" +%y)\n"
 printf "#define COREBOOT_BUILD_MONTH_BCD 0x$(our_date "$DATE" +%m)\n"
 printf "#define COREBOOT_BUILD_DAY_BCD 0x$(our_date "$DATE" +%d)\n"



More information about the coreboot-gerrit mailing list