#!/usr/bin/perl -w use strict; my $range = shift; my %app; foreach (`git diff --name-only $range`) { if (m@lib/([^/]*)@) { $app{$1} = 1; } elsif (m@erts/@) { $app{erts} = 1; } else { $app{otp} = 1; } } print join(', ', sort keys %app), "\n";