epilogue/forum/create_sqlite_database

15 lines
527 B
Bash
Executable File

#!/bin/sh
SQLITE_OUT=forum.sqlite
AWK=awk
if command -v mawk &> /dev/null; then
AWK=mawk
fi
$AWK -f ../mysql2sqlite/mysql2sqlite structure.sql | sqlite3 -echo $SQLITE_OUT
$AWK -f ../mysql2sqlite/mysql2sqlite misc_data.sql | sqlite3 -echo $SQLITE_OUT
$AWK -f ../mysql2sqlite/mysql2sqlite categories.sql | sqlite3 -echo $SQLITE_OUT
$AWK -f ../mysql2sqlite/mysql2sqlite boards.sql | sqlite3 -echo $SQLITE_OUT
$AWK -f ../mysql2sqlite/mysql2sqlite threads.sql | sqlite3 -echo $SQLITE_OUT
#cat threads.sql | sqlite3 $SQLITE_OUT