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.

setup_sqlite.sh 449B

1234567891011121314151617181920212223
  1. #!/usr/bin/env bash
  2. if [ -e mice.db ]; then
  3. read -p "Overwrite existing mice.db, erasing any existing data? " -n 1 -r
  4. if [[ $REPLY =~ ^[Yy]$ ]]; then
  5. rm mice.db
  6. else
  7. echo
  8. echo "No disassemble!"
  9. exit
  10. fi
  11. fi
  12. echo
  13. echo
  14. echo "Creating new mice.db, with schema:"
  15. sqlite3 mice.db < schema.sql
  16. sqlite3 mice.db '.schema'
  17. # sqlite3 mice.db '.schema event_types'
  18. echo
  19. echo "Event types:"
  20. sqlite3 mice.db 'SELECT * FROM event_types;'