File: pahole-version.sh

package info (click to toggle)
linux 6.12.69-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie-proposed-updates
  • size: 1,675,776 kB
  • sloc: ansic: 25,915,311; asm: 269,652; sh: 136,658; python: 65,456; makefile: 55,720; perl: 37,753; xml: 19,284; cpp: 5,895; yacc: 4,927; lex: 2,939; awk: 1,594; sed: 28; ruby: 25
file content (13 lines) | stat: -rwxr-xr-x 269 bytes parent folder | download | duplicates (27)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
#
# Usage: $ ./pahole-version.sh pahole
#
# Prints pahole's version in a 3-digit form, such as 119 for v1.19.

if [ ! -x "$(command -v "$@")" ]; then
	echo 0
	exit 1
fi

"$@" --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/'