summaryrefslogtreecommitdiff
path: root/recipes/xinput-calibrator/xinput-calibrator-0.5.0/xinput_calibrator_once.sh
blob: 82fcfc657094396c427079b30e7eebc14ca5d163 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
if [ -e /etc/pointercal.xinput ] ; then
  echo Using calibration data stored in /etc/pointercal.xinput
  . /etc/pointercal.xinput
else
  CAL=`/usr/bin/xinput_calibrator | tee /etc/pointercal.xinput.log | grep xinput| sed 's/^ //g; s/$/;/g'`
  if [ ! -z "$CAL" ] ; then
    echo $CAL > /etc/pointercal.xinput
    echo Calibration data stored in /etc/pointercal.xinput
  fi
fi