#!/bin/sh

PATH=${PATH}/media/mmcblk0p1/Programs/_python26/bin:
PATH=${PATH}/media/mmcblk0p1/Programs/_php5/bin:
PATH=${PATH}/media/mmcblk0p1/Programs/_xapian/bin:
PATH=${PATH}/media/mmcblk0p1/Programs/_offline.wiki/bin:

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}/media/mmcblk0p1/Programs/_python26/lib:
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}/media/mmcblk0p1/Programs/_php5/lib:
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}/media/mmcblk0p1/Programs/_xapian/lib:

export PATH LD_LIBRARY_PATH

cd /media/mmcblk0p1/Programs/_offline.wiki/wiktionary/mywiki

python manage.py runserver &
SERVERPID=$!

sleep 5

../../bin/erbrowser http://localhost:8000/

kill -9 $SERVERPID

exec /bin/true
