stow/tools/get-version

16 lines
218 B
Text
Raw Normal View History

#!/usr/bin/perl
2019-06-25 15:04:11 -04:00
use strict;
use warnings;
2019-06-25 15:04:11 -04:00
open(CONF, "configure.ac") or die "Couldn't open configure.ac: $!\n";
while (<CONF>) {
if (/^AC_INIT\(\[stow\], \[(.+?)\]/) {
print "$1\n";
exit 0;
}
}
exit 1;