#!/bin/bash

# NOW=$(date +"%Y%m%d")

echo Caching Documents ...
mkdir -p output

export VERSIONER_PYTHON_VERSION=2.6
export VERSIONER_PYTHON_PREFER_32_BIT=yes
export PYTHONPATH=../../../../mysql-mac-res/python

python ./mysqldoclib.py --db=./output/mysqldoclib_full_56.sqlite --title="MySQL 5.6 Reference Manual" --file=./input/refman56-html.zip build-man

python ./mysqldoclib.py --db=./output/mysqldoclib.sqlite --title="MySQL Workbench 6.0 Reference Manual" --file=./input/wb-html-guitools.zip build-man


#echo Moving to local DocLibrary directory

#mkdir -p ~/Library/Application\ Support/MySQL/DocLibrary/
#cp ./repository/mysqldoclib_full_55.sqlite ~/Library/Application\ Support/MySQL/DocLibrary/.
#cp ./repository/mysqldoclib.sqlite ~/Library/Application\ Support/MySQL/DocLibrary/.

echo Done.
