5 # Build binary sqlite iceweasel files from plain text SQL files.
7 echo "Building iceweasel sqlite files"
9 INSTALLED_PACKAGES
="sqlite3"
10 SQL_SRC_DIR
=/usr
/share
/amnesia
/iceweasel
/sql
11 ICEWEASEL_PROFILE_DIR
=/etc
/iceweasel
/profile
13 [ -d "${SQL_SRC_DIR}" ] ||
exit 11
15 apt-get
install --yes $INSTALLED_PACKAGES
17 for sql_src_file
in ${SQL_SRC_DIR}/*.sql
; do
18 db
="$(basename ${sql_src_file} | sed -e 's|\.sql$||')"
19 dst_file
="${ICEWEASEL_PROFILE_DIR}/${db}.sqlite"
20 sqlite3
"${dst_file}" < "${sql_src_file}"
24 apt-get
--yes purge
$INSTALLED_PACKAGES