File: gen_version_h

package info (click to toggle)
efibootguard 0.21-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 796 kB
  • sloc: ansic: 7,805; makefile: 405; python: 326; sh: 84
file content (30 lines) | stat: -rwxr-xr-x 620 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
#
# EFI Boot Guard
#
# Copyright (c) Siemens AG, 2017
#
# Authors:
#  Jan Kiszka <jan.kiszka@siemens.com>
#
# This work is licensed under the terms of the GNU GPL, version 2.  See
# the COPYING file in the top-level directory.
#
# SPDX-License-Identifier:	GPL-2.0-only
#

echo "/* Auto-generated - leave alone and don't commit! */"
echo ""

cd "$1" > /dev/null

if true; then
	version="`cat VERSION`"
else
	describe="`git describe --long --dirty --match "v[0-9].[0-9]*"`"
	version="`echo $describe | sed -e 's/\([^-]*\)-\(.*\)/\1 (\2)/'`"
fi

cd - > /dev/null

echo "#define EFIBOOTGUARD_VERSION	\"$version\""