scripts/image: create /etc/gitrev and show git rev in ssh splash on development builds

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2011-01-13 13:27:53 +01:00
parent da2966ca26
commit 71fdef5d82
2 changed files with 7 additions and 0 deletions

View File

@ -111,6 +111,7 @@ get_version() {
if [ "$OPENELEC_VERSION" = devel -o "$OPENELEC_VERSION" = debug ]; then
GIT_BUILD=`git log --pretty=format:'' | wc -l`
GIT_HASH=`git log -n1 --format=%H`
OPENELEC_VERSION=$OPENELEC_VERSION-$BUILD_DATE-r$GIT_BUILD
fi

View File

@ -64,6 +64,9 @@ mkdir -p $INSTALL
echo "$OPENELEC_VERSION" > $INSTALL/etc/version
echo "$TARGET_VERSION" > $INSTALL/etc/release
echo "$DISTRONAME - Version: $OPENELEC_VERSION" > $INSTALL/etc/openelec-release
if [ -n "$GIT_HASH" ]; then
echo "$GIT_HASH" >> $INSTALL/etc/gitrev
fi
# create /etc/issue
echo $GREATING0 > $INSTALL/etc/issue
@ -72,6 +75,9 @@ mkdir -p $INSTALL
echo $GREATING3 >> $INSTALL/etc/issue
echo $GREATING4 >> $INSTALL/etc/issue
echo "$DISTRONAME Version: $OPENELEC_VERSION" >> $INSTALL/etc/issue
if [ -n "$GIT_HASH" ]; then
echo "$DISTRONAME git: $GIT_HASH" >> $INSTALL/etc/issue
fi
# copy project related files to filesystem
if [ -d "$PROJECT_DIR/$PROJECT/filesystem" ]; then