aboutsummaryrefslogtreecommitdiff
path: root/regenGradescopeDB.sh
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2023-05-12 12:55:09 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2023-05-12 12:55:09 -0400
commit8739f1acab8366dceb4b5ae624c4181b585f134a (patch)
treea2b2163462be6f26163646290a00ed1452217e71 /regenGradescopeDB.sh
parent65920f8452917dbbd2507d58df50d591d6679836 (diff)
downloadGradeBook-8739f1acab8366dceb4b5ae624c4181b585f134a.tar.gz
GradeBook-8739f1acab8366dceb4b5ae624c4181b585f134a.zip
more general converters for grades csv files
Diffstat (limited to 'regenGradescopeDB.sh')
-rwxr-xr-xregenGradescopeDB.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/regenGradescopeDB.sh b/regenGradescopeDB.sh
index 774f624..e7273ea 100755
--- a/regenGradescopeDB.sh
+++ b/regenGradescopeDB.sh
@@ -1,7 +1,10 @@
#!/bin/bash
-rm -f 2021_Gradescope.db
-printf '.mode csv\n.import 2021_Gradescope.csv export_table' | \
- sqlite3 2021_Gradescope.db
+CSVFILE="$1"
+dbfile=Gradescope.db
+rm -f "$dbfile"
+
+printf ".mode csv\n.import \"$CSVFILE\" export_table" | \
+ sqlite3 "$dbfile"