isbn-sort/init.sh
2024-04-03 16:54:54 +02:00

14 lines
235 B
Bash
Executable File

#!/bin/bash
DATABASE=books.sqlite
mkdir -p data
ls data | grep "$DATABASE" > /dev/null
if [ $? -eq 0 ]; then
echo "Created data/books-backup.db"
mv "data/$DATABASE" data/books-backup.db
fi
sqlite3 "data/$DATABASE" < schema.sql