From 31d513c50a61acad71c3a74d42de283777621aea Mon Sep 17 00:00:00 2001 From: Philipp Felix Hoefler Date: Wed, 29 Jan 2014 16:26:56 +0100 Subject: [PATCH] buildsystem: support for older git versions As older git versions don't support "git rev-list --count" run it with wc instead if needed --- scripts/image | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/image b/scripts/image index 92aa2c2ebd..ef6a20db62 100755 --- a/scripts/image +++ b/scripts/image @@ -31,7 +31,10 @@ $SCRIPTS/build kmod:host BUILD_DATE=`date +%Y%m%d%H%M%S` if [ "$OPENELEC_VERSION" = devel -o "$OPENELEC_VERSION" = debug ]; then - GIT_BUILD=$(git rev-list --count HEAD) + if ! GIT_BUILD=$(git rev-list --count HEAD 2>/dev/null) + then + GIT_BUILD=$(git rev-list HEAD | wc -l) + fi GIT_HASH=$(git rev-parse HEAD) GIT_ABBREV=$(git log -1 --pretty=format:%h) OPENELEC_VERSION=$OPENELEC_VERSION-$BUILD_DATE-r$GIT_BUILD-g$GIT_ABBREV