aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"