diff --git a/scripts/list-hw b/scripts/list-hw new file mode 100755 index 0000000000000000000000000000000000000000..79e0491664195ce137ccb8b3bbc1233cc68f6352 --- /dev/null +++ b/scripts/list-hw @@ -0,0 +1,19 @@ +#!/usr/bin/perl -w + +use strict; + +my @branches = `git branch -a`; +my %hw = (); + +foreach my $branch (@branches) { + chomp $branch; + + ## Trim whitespace and extra git crap + $branch =~ s/^[\*\s]*(.*?)\s*$/$1/; + + if ($branch =~ /(\w+)-(submit|graded)/) { + $hw{$1} = 1; + } +} + +print map {"$_\n"} sort(keys(%hw));