Alfix is an open-source web-based viewer for the eLearn workshop manuals for various Alfa Romeo, Lancia and Fiat cars.
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.
|
#!/bin/bash
|
|
|
|
pname=alfix
|
|
langid="1"
|
|
cdpath="$1"
|
|
mdb="${cdpath}/database/elearn_${langid}.dat"
|
|
dbfile="app/${pname}.db"
|
|
|
|
# create the db
|
|
echo "creating schema..."
|
|
mdb-schema "${mdb}" | sed -e 's:Memo/Hyperlink:Text:g' | sqlite3 "${dbfile}"
|
|
|
|
# import db contents
|
|
for table in $(mdb-tables "${mdb}"); do
|
|
echo "importing table ${table}"
|
|
sqlite3 "${dbfile}" ".mode csv" ".separator |" ".import csv/${pname}-${table}.csv ${table}"
|
|
done
|
|
|
|
echo "done"
|