File: svers.pl

package info (click to toggle)
saclib 2.2.8-6.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,872 kB
  • sloc: ansic: 40,932; csh: 1,190; asm: 541; awk: 320; sh: 246; perl: 116; makefile: 98; sed: 48
file content (17 lines) | stat: -rwxr-xr-x 416 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
if (! $ENV{'saclib'})
{
    print "SACLIB Error: The saclib environment variable must be set!\n";
    exit(1);
}

open(SACMAC,"< $ENV{'saclib'}/include/sacmacros.h");
$maj = "?";
$min = "?";
$rev = "?";
while(<SACMAC>)
{
    if ($_ =~ /SACMAJVERS\s+(\d+)/) { $maj = $1; }
    if ($_ =~ /SACMINVERS\s+(\d+)/) { $min = $1; }
    if ($_ =~ /SACREVVERS\s+(\d+)/) { $rev = $1; }
} 
print "Saclib ${maj}.${min}.${rev}\n";