Commit f44ef2b7 authored by Robert Ricci's avatar Robert Ricci

Simple script to detect what homeworks exist

Just looks for any <foo>-submit or -graded tags
parent 1219b312
#!/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));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment