From 25d3f021c1007130fe131ead443123b74095437a Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Wed, 19 Jul 2017 11:25:38 +0900 Subject: [PATCH] Support no git situation. Signed-off-by: NIIBE Yutaka --- ChangeLog | 4 +++- src/configure | 10 ++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 929455c..292dab4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,13 @@ 2017-07-19 NIIBE Yutaka + * src/configure (REVISION): Generate even when no git. + * polarssl/library/bignum.c (mpi_exp_mod): Call mpi_grow for X after the initialization of RR. 2017-07-18 NIIBE Yutaka - * src/configure: Bark when not git. + * src/configure: Bark when no git available. 2017-07-18 Anthony Romano diff --git a/src/configure b/src/configure index 3446eb0..1940e22 100755 --- a/src/configure +++ b/src/configure @@ -47,11 +47,13 @@ factory_reset=no # Revision number if test -e ../.git; then - if !type git >/dev/null 2>&1; then - echo 'No git available, please install git' - exit 1 + if type git >/dev/null 2>&1; then + REVISION=`git describe --dirty="-modified"` + else + # echo 'No git available, please install git' + GIT_REVISION=$(sed -e 's/^\(.......\).*$/g\1/' ../.git/$(sed -e 's/^ref: //' ../.git/HEAD)) + REVISION=`cat ../VERSION`-$GIT_REVISION fi - REVISION=`git describe --dirty="-modified"` else REVISION=`cat ../VERSION` fi