#/bin/sh -xe
. ${HOME}/.bin/_config

mkdir -p ${PIMDIR}/documents/_incoming
mv -f /tank/scanner/*.pdf ${PIMDIR}/documents/_incoming/ 2>/dev/null
if [ $? -ne 0 ]
then
    echo "Nothing to import..."
    exit 0
fi
${HOME}/.bin/documents-update
${HOME}/.bin/documents-ocr
