mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
buildsystem: support for older git versions
As older git versions don't support "git rev-list --count" run it with wc instead if needed
This commit is contained in:
parent
e91ea202cf
commit
31d513c50a
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user