#!/bin/sh
#
# Ulrich Vollert <hsqldb@ulrivo.de>
# 2002-10-19
#
# script to build ipkg-package for Zaurus
#
# 1. checks whether there is a directory package/home/QtPalmtop
# 2. copies ../../../lib/hsqldbz.jar to package/home/QtPalmtop/java
# 3. copies ../../../doc/zaurus/* to package/home/QtPalmtop/help/html/hsqldb
# 4. copies ../../../doc/zaurus/readme to package/home/root/hqldb
# 5. calls ipkg-build with the subdirectory name package
#
if [ ! -d package/home/QtPalmtop ]
then
    echo 'Directory package/home/QtPalmtop is missing.'
exit 1
fi
if [ ! -d package/home/QtPalmtop/java ]
then
    mkdir package/home/QtPalmtop/java
fi
if [ ! -d package/home/QtPalmtop/help ]
then
    mkdir package/home/QtPalmtop/help
fi
if [ ! -d package/home/QtPalmtop/help/html ]
then
    mkdir package/home/QtPalmtop/help/html
fi
if [ ! -d package/home/QtPalmtop/help/html/hsqldb ]
then
    mkdir package/home/QtPalmtop/help/html/hsqldb
fi
if [ ! -d package/home/root ]
then
    mkdir package/home/root
fi
if [ ! -d package/home/root/hsqldb ]
then
    mkdir package/home/root/hsqldb
fi
if [ -s ../../../lib/hsqldbz.jar ]
then
    cp ../../../lib/hsqldbz.jar package/home/QtPalmtop/java
else
    echo 'lib/hsqldbz.jar is missing.'
    exit 1
fi
cp -r ../../../doc/zaurus/* package/home/QtPalmtop/help/html/hsqldb/
cp ../../../doc/zaurus/readme package/home/root/hsqldb
ipkg-build package
