aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2022-09-26 23:50:08 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2022-09-26 23:50:08 -0400
commitf1c658425b34a5d4f9c9e4554300fa9b217f3545 (patch)
tree4ca5e394a9340f28afe3108de22b9fbe56e8df61
parent659a053d4297b74c3daf748f0a608b5b7e583dd2 (diff)
downloadGradeBook-f1c658425b34a5d4f9c9e4554300fa9b217f3545.tar.gz
GradeBook-f1c658425b34a5d4f9c9e4554300fa9b217f3545.zip
simplified regenBlackboardDB
-rwxr-xr-xregenBlackboardDB.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/regenBlackboardDB.sh b/regenBlackboardDB.sh
index 44f5655..4231683 100755
--- a/regenBlackboardDB.sh
+++ b/regenBlackboardDB.sh
@@ -1,7 +1,10 @@
#!/bin/bash
-rm -f 2021_Blackboard.db
-printf '.mode csv\n.import 2021_Blackboard.csv export_table' | \
- sqlite3 2021_Blackboard.db
+CSVFILE="$1"
+bbfile=Blackboard.db
+rm -f "$bbfile"
+
+printf ".mode csv\n.import \"$CSVFILE\" export_table" | \
+ sqlite3 "$bbfile"