Add extra version information framework
[deliverable/lttng-modules.git] / extra-version-name.sh
diff --git a/extra-version-name.sh b/extra-version-name.sh
new file mode 100755 (executable)
index 0000000..f704256
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+# SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1)
+
+# First argument is the path to the lttng modules sources.
+TOP_LTTNG_MODULES_DIR="$1"
+
+EXTRA_VERSION_NAME="$(sed -n '1p' "${TOP_LTTNG_MODULES_DIR}/extra_version/name" 2> /dev/null)"
+
+if [ "x${EXTRA_VERSION_NAME}" != "x" ]; then
+       echo "${EXTRA_VERSION_NAME}"
+else
+       echo "0"
+fi
This page took 0.023938 seconds and 5 git commands to generate.