Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Robert Ricci
Evaluating Networked Systems
Commits
2d5ec077
Commit
2d5ec077
authored
Jan 07, 2014
by
Robert Ricci
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change total score line so that it looks nicer in a commit message
parent
5a107aca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
assignments/hw1/score.txt
assignments/hw1/score.txt
+1
-1
assignments/template/score.txt
assignments/template/score.txt
+1
-1
scripts/total-score
scripts/total-score
+3
-3
No files found.
assignments/hw1/score.txt
View file @
2d5ec077
...
...
@@ -3,4 +3,4 @@ HW #1 Score:
XX / 10 : Submitted a PDF
======
Total: XX / YY
Total
score
: XX / YY
assignments/template/score.txt
View file @
2d5ec077
...
...
@@ -3,4 +3,4 @@ HW #1 Score:
XX / 10 : Submitted a PDF
======
Total: XX / YY
Total
score
: XX / YY
scripts/total-score
View file @
2d5ec077
...
...
@@ -22,9 +22,9 @@ foreach my $line (@scorefile) {
if
(
$possible
)
{
$total_possible
+=
$possible
;
}
}
elsif
(
$line
=~
/^\s*Total:\s*(XX|\d+)?\s*\/\s*(YY|\d+)?/
)
{
}
elsif
(
$line
=~
/^\s*Total
score
:\s*(XX|\d+)?\s*\/\s*(YY|\d+)?/
)
{
$found_totalline
=
1
;
$line
=
"
Total:
$total
/
$total_possible
\n
";
$line
=
"
Total
score
:
$total
/
$total_possible
\n
";
print
$line
;
}
}
...
...
@@ -34,7 +34,7 @@ if ($total_possible == 0) {
}
if
(
!
$found_totalline
)
{
my
$line
=
"
Total:
$total
/
$total_possible
";
my
$line
=
"
Total
score
:
$total
/
$total_possible
";
push
@scorefile
,
$line
;
print
$line
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment