Get you a Pi, quantify your vermin.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

23 lines
449 B

#!/usr/bin/env bash
if [ -e mice.db ]; then
read -p "Overwrite existing mice.db, erasing any existing data? " -n 1 -r
if [[ $REPLY =~ ^[Yy]$ ]]; then
rm mice.db
else
echo
echo "No disassemble!"
exit
fi
fi
echo
echo
echo "Creating new mice.db, with schema:"
sqlite3 mice.db < schema.sql
sqlite3 mice.db '.schema'
# sqlite3 mice.db '.schema event_types'
echo
echo "Event types:"
sqlite3 mice.db 'SELECT * FROM event_types;'