You've already forked linux-apfs-rw
mirror of
https://github.com/linux-apfs/linux-apfs-rw.git
synced 2026-05-01 15:01:34 -07:00
cba2045422
Some users might build the driver from the tarball that github produces on release, so the reported git commit would be an empty string. Instead extract the version from the dkms file and use that, but add a question mark so that I know that it might not be accurate. Signed-off-by: Ernesto A. Fernández <ernesto@corellium.com>
14 lines
339 B
Bash
Executable File
14 lines
339 B
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# Script to generate the module version header
|
|
#
|
|
|
|
if command -v git >/dev/null 2>&1 && [ -d .git ]; then
|
|
GIT_COMMIT=$(git describe HEAD | tail -c 9)
|
|
else
|
|
GIT_COMMIT="$(grep PACKAGE_VERSION dkms.conf | cut -d '"' -f2)?"
|
|
fi
|
|
|
|
printf '#define GIT_COMMIT\t"%s"\n' "$GIT_COMMIT" > version.h
|