#!/bin/sh
set -e

VERSION=`dpkg-query -W -f='${Version}' fujitsu-tablet-kernel-source | cut -d'-' -f1 | cut -d':' -f2`

#DEBHELPER#

case "$1" in
  configure)
    dkms remove -m fujitsu-tablet -v $VERSION --all 2>/dev/null || true
    dkms add -m fujitsu-tablet -v $VERSION
    dkms build -m fujitsu-tablet -v $VERSION
    dkms install -m fujitsu-tablet -v $VERSION --force
    ;;
esac


