#!/bin/sh
set -e

. optvars

## if tegaki-wagomu-* package, 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/models/wagomu
    ln -sv $1/share/tegaki/models/wagomu/* /usr/share/tegaki/models/wagomu/
fi
