From 2e4654b2df94e55f0beb5614331dcf983118989c Mon Sep 17 00:00:00 2001 From: Ricardo Signes Date: Mon, 10 Feb 2014 18:38:07 -0500 Subject: [PATCH] tweak Porting/acknowledgements.pl to avoid awk and grep Rather than assuming that we are on a unix system with the standard kit, we can rely on this neat little programming language that provides their behavior and is already assumed to be present! --- Porting/acknowledgements.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Porting/acknowledgements.pl b/Porting/acknowledgements.pl index 2cd66c9..13718a7 100644 --- a/Porting/acknowledgements.pl +++ b/Porting/acknowledgements.pl @@ -125,7 +125,9 @@ sub _round { # version sub changes_files { my $output = qx(git diff --shortstat $since_until); - my $output_code_changed = qx# git diff --shortstat $since_until -- \$(git diff --numstat $since_until |awk '{print \$3}' | grep -v ^dist/Module-CoreList | grep -E '\.(pm|c|h|t)\$') #; + my @filenames = qx(git diff --numstat $since_until | perl -anle 'next if m{^dist/Module-CoreList} or not /\\.(?:pm|c|h|t)\\z/; print \$F[2]'); + chomp @filenames; + my $output_code_changed = qx# git diff --shortstat $since_until -- @filenames #; return ( _changes_from_cmd ( $output ), _changes_from_cmd ( $output_code_changed ) ); -- 2.7.4