summaryrefslogtreecommitdiff
path: root/src/udev/test/rules-test.sh
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2012-04-03 21:08:04 +0200
committerKay Sievers <kay.sievers@vrfy.org>2012-04-03 21:08:04 +0200
commit19c5f19d69bb5f520fa7213239490c55de06d99d (patch)
tree0066ff6b95da3b86812f72f771fd09bab25d4e7a /src/udev/test/rules-test.sh
parent3eff4208ffecedd778fec260f0d4b18e94dab443 (diff)
parent4db539b27021dcaa716828cbb689f591adb5af23 (diff)
import udev repository
Diffstat (limited to 'src/udev/test/rules-test.sh')
-rwxr-xr-xsrc/udev/test/rules-test.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/udev/test/rules-test.sh b/src/udev/test/rules-test.sh
new file mode 100755
index 0000000000..1e224ff8b5
--- /dev/null
+++ b/src/udev/test/rules-test.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Call the udev rule syntax checker on all rules that we ship
+#
+# (C) 2010 Canonical Ltd.
+# Author: Martin Pitt <martin.pitt@ubuntu.com>
+
+[ -n "$srcdir" ] || srcdir=`dirname $0`/..
+
+# skip if we don't have python
+type python >/dev/null 2>&1 || {
+ echo "$0: No python installed, skipping udev rule syntax check"
+ exit 0
+}
+
+$srcdir/test/rule-syntax-check.py `find $srcdir/rules -name '*.rules'`