Refactoring: combine probe callbacks
[lttng-modules.git] / scripts / abi-sle-version.sh
index bd6d5f1d255a2695cb3ffe5834adaa17616bef91..e079e0657e812c45980e801cdd9dc16702bced3f 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1)
+# SPDX-License-Identifier: (GPL-2.0-only OR LGPL-2.1-only)
 
 # First argument is the path to the kernel headers.
 KPATH=$1
@@ -23,7 +23,7 @@ if [ ! -f "${KPATH}/include/generated/utsrelease.h" ]; then
        exit 0
 fi
 
-SLE_RELEASE="$(sed -rn 's/^#define UTS_RELEASE "(.*)-([0-9\.]+)-(.*)"/\2/p' "${KPATH}/include/generated/utsrelease.h")"
+SLE_RELEASE="$(sed -rn 's/^#define UTS_RELEASE "(.*)-([0-9a-zA-Z\.]+)-(.*)"/\2/p' "${KPATH}/include/generated/utsrelease.h")"
 
 SLE_RELEASE_MAJOR="$(echo "${SLE_RELEASE}" | sed -rn 's/^([0-9]+)(.*)$/\1/p')"
 SLE_RELEASE_MINOR="$(echo "${SLE_RELEASE}" | sed -rn 's/^([0-9]+)\.([0-9]+)(.*)$/\2/p')"
@@ -38,6 +38,6 @@ if [ "x$SLE_RELEASE_PATCH" = "x" ]; then
 fi
 
 # Combine all update numbers into one
-SLE_API_VERSION="$((SLE_RELEASE_MAJOR * 10000 + SLE_RELEASE_MINOR * 100 + SLE_RELEASE_PATCH))"
+SLE_API_VERSION="$((SLE_RELEASE_MAJOR * 100000 + SLE_RELEASE_MINOR * 100 + SLE_RELEASE_PATCH))"
 
 echo ${SLE_API_VERSION}
This page took 0.023698 seconds and 4 git commands to generate.