#!/bin/sh
set -e

. optvars

## if tegaki-wagomu, link the modules, otherwise tegaki doesn't find them
PACKAGE=`basename $1`
if [ `echo $PACKAGE | sed 's/_.*//' | sed 's/\(tegaki-wagomu\)_.*/\1/'` = tegaki-wagomu ]
then
    mkdir -p /usr/share/tegaki/engines
    for FILE in `ls $1/share/tegaki/engines/`
    do
	ln -sv $1/share/tegaki/engines/$FILE /usr/share/tegaki/engines/
    done
fi
