Skip to content

Instantly share code, notes, and snippets.

Created June 10, 2011 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1018467 to your computer and use it in GitHub Desktop.
Save anonymous/1018467 to your computer and use it in GitHub Desktop.
#! perl
# invoke as "perl check-version.pl path/to/nqp.exe"
use lib 'tools/lib';
use NQP::Configure qw(slurp cmp_rev read_config);
my %nqp_config = read_config($ARGV[0]);
my $nqp_have = $nqp_config{'nqp::version'} || '';
my ($nqp_want) = split(' ', slurp('tools/build/NQP_REVISION'));
if (!$nqp_have || cmp_rev($nqp_have, $nqp_want) < 0) {
die "NQP $nqp_have isn't new enough ($nqp_want required)\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment