stow/tools/get-version
Adam Spiers 157f39385a Change -w to "use warnings;" in tools/get-version
This is more idiomatic and consistent with everywhere else.
2019-06-27 20:39:16 +01:00

15 lines
218 B
Perl
Executable file

#!/usr/bin/perl
use strict;
use warnings;
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;