#! /bin/sh
LEAPMOTIONVERSION=2.3.1+31549
LEAPMOTIONDEB="/csciloc/ubuntu/Distributions/Leap-${LEAPMOTIONVERSION}-x64.deb"

# From http://askubuntu.com/questions/15853/how-can-a-script-check-if-its-being-run-as-root
if ! [ $(id -u) = 0 ]; then
   echo "This script must be run as root"
   exit 1
fi
# end of askubuntu stuff

/usr/bin/dpkg --remove leap
echo "install LeapMotion from ${LEAPMOTIONDEB}"
/usr/bin/dpkg --install "${LEAPMOTIONDEB}"
