#!/bin/sh # # Jailhouse, a Linux-based partitioning hypervisor # # Copyright (c) Siemens AG, 2014 # # Authors: # Jan Kiszka # # This work is licensed under the terms of the GNU GPL, version 2. See # the COPYING file in the top-level directory. # echo -e "/* Auto-generated - leave alone and don't commit! */\n" if ! git rev-parse 2>/dev/null; then version="`cat $1/VERSION`" else cd $1 > /dev/null git diff > diff.log describe="`git describe --long --dirty --match "v[0-9].[0-9]*"`" version="`echo $describe | sed -e 's/\([^-]*\)-\(.*\)/\1 (\2)/'`" cd - > /dev/null fi echo "#define JAILHOUSE_VERSION \"$version\""