2012-01-10 07:34:15 +07:00
|
|
|
#!/bin/sh
|
2010-09-21 17:45:52 +07:00
|
|
|
# Call the udev rule syntax checker on all rules that we ship
|
|
|
|
#
|
|
|
|
# (C) 2010 Canonical Ltd.
|
|
|
|
# Author: Martin Pitt <martin.pitt@ubuntu.com>
|
|
|
|
|
2012-11-20 07:09:37 +07:00
|
|
|
[ -n "$builddir" ] || builddir=`dirname $0`/..
|
2010-09-21 17:45:52 +07:00
|
|
|
|
|
|
|
# skip if we don't have python
|
|
|
|
type python >/dev/null 2>&1 || {
|
2012-01-10 07:34:15 +07:00
|
|
|
echo "$0: No python installed, skipping udev rule syntax check"
|
|
|
|
exit 0
|
2010-09-21 17:45:52 +07:00
|
|
|
}
|
|
|
|
|
2012-11-20 07:09:37 +07:00
|
|
|
$builddir/test/rule-syntax-check.py `find $builddir/rules -name '*.rules'`
|