2024-04-03 16:54:54 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
DATABASE=books.sqlite
|
|
|
|
|
|
|
|
mkdir -p data
|
|
|
|
|
|
|
|
ls data | grep "$DATABASE" > /dev/null
|
|
|
|
|
|
|
|
if [ $? -eq 0 ]; then
|
2024-04-19 11:30:55 +02:00
|
|
|
echo "Created data/books-backup.sqlite"
|
|
|
|
mv "data/$DATABASE" data/books-backup.sqlite
|
2024-04-03 16:54:54 +02:00
|
|
|
fi
|
|
|
|
|
2024-04-05 17:12:29 +02:00
|
|
|
sqlite3 "data/$DATABASE" < isbn_sort/schema.sql
|