Cleanup: modinfo keys
[lttng-modules.git] / rt-patch-version.sh
1 #!/bin/sh
2
3 # First argument is the path to the kernel headers.
4 KPATH="$1"
5
6 VERSIONFILE=""
7
8 if [ -f "${KPATH}/localversion-rt" ]; then
9 VERSIONFILE="${KPATH}/localversion-rt"
10
11 elif [ -f "${KPATH}/source/localversion-rt" ]; then
12 VERSIONFILE="${KPATH}/source/localversion-rt"
13 else
14 echo 0
15 exit 0
16 fi
17
18 RT_PATCH_VERSION=$(sed -rn 's/^-rt([0-9]+)$/\1/p' "${VERSIONFILE}")
19
20 if [ "x${RT_PATCH_VERSION}" = "x" ]; then
21 echo 0
22 exit 0
23 fi
24
25 echo "${RT_PATCH_VERSION}"
This page took 0.029953 seconds and 4 git commands to generate.