vos-addsite-pod-error-20080220
[openafs.git] / src / packaging / Debian / kernel-version
1 #!/usr/bin/perl
2 #
3 # Extract the kernel version from the kernel version header file.  Takes the
4 # kernel source path as its only argument.  If the version header couldn't be
5 # found, print nothing and exit quietly.
6
7 my $ksrc = shift;
8 unless ($ksrc && open (VERSION, "$ksrc/include/linux/version.h")) {
9     exit 0;
10 }
11 my $line = <VERSION>;
12 if ($line =~ /"(.+)"/) {
13     print "$1\n";
14 }
15 exit 0;