diff options
author | Steve Hay <steve.m.hay@googlemail.com> | 2012-08-10 17:54:51 +0100 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2012-08-10 17:59:13 +0100 |
commit | 7ba8970dd3a78097012503f0c4b1900e36b571a9 (patch) | |
tree | d3e3f9ae5b9443ff46141c9dae82c340cf36f20b /Porting/cmpVERSION.pl | |
parent | e56a566bdb680e52902a515528e316ab1d718662 (diff) | |
download | perl-7ba8970dd3a78097012503f0c4b1900e36b571a9.tar.gz |
Fix command-line argument quoting in Porting/cmpVERSION.pl
Windows, NetWare and VMS want double-quotes, other OSes want single quotes.
Diffstat (limited to 'Porting/cmpVERSION.pl')
-rwxr-xr-x | Porting/cmpVERSION.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Porting/cmpVERSION.pl b/Porting/cmpVERSION.pl index 8d39d74930..97c78b2775 100755 --- a/Porting/cmpVERSION.pl +++ b/Porting/cmpVERSION.pl @@ -146,6 +146,7 @@ printf "1..%d\n" => scalar keys %module_diffs if $tap; my $count; my $diff_cmd = "git --no-pager diff $tag_to_compare "; +my $q = ($^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'VMS') ? '"' : "'"; my (@diff); foreach my $pm_file (sort keys %module_diffs) { @@ -166,7 +167,7 @@ foreach my $pm_file (sort keys %module_diffs) { } else { if ($tap) { foreach (sort @{$module_diffs{$pm_file}}) { - print "# $_" for `$diff_cmd '$_'`; + print "# $_" for `$diff_cmd $q$_$q`; } if (exists $skip_versions{$pm_file} and grep $pm_version eq $_, @{$skip_versions{$pm_file}}) { @@ -190,6 +191,6 @@ sub get_file_from_git { if ($diffs) { for (sort @diff) { print "\n"; - system "$diff_cmd '$_'"; + system "$diff_cmd $q$_$q"; } } |