File: pahole-version.sh

package info (click to toggle)
linux 6.9.9-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,614,996 kB
  • sloc: ansic: 25,167,773; asm: 268,135; sh: 129,748; python: 56,278; makefile: 53,946; perl: 37,949; cpp: 5,665; yacc: 4,957; lex: 2,834; awk: 1,148; ruby: 25; sed: 5
file content (13 lines) | stat: -rwxr-xr-x 269 bytes parent folder | download | duplicates (43)
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/'