Commit 5a107aca authored by Robert Ricci's avatar Robert Ricci

Add script to commit score file, with the total score in the message

parent 0a28d7fa
#!/usr/bin/perl -w
my $SCOREFILE = "score.txt";
open(SCORE,"<$SCOREFILE") or die "Unable to open $SCOREFILE: $!\n";
my $scoreline = undef;
foreach my $line (<SCORE>) {
if ($line =~ /^Total/) {
if ($scoreline) {
die "ERROR: Found two score lines!\n";
$scoreline = $line;
if (!$scoreline) {
die "ERROR: Didn't find a score line\n";
chomp $scoreline;
system "git add score.txt";
system "git commit -m \"$scoreline\"";
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