create pre-commit hook for xlint
This commit is contained in:
parent
21479030d5
commit
2c947f2022
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# xlint all changed templates
|
||||||
|
|
||||||
|
EX_ERR=1
|
||||||
|
|
||||||
|
FILES=$(git diff --name-only --staged | grep template)
|
||||||
|
for FILE in ${FILES}; do
|
||||||
|
stat "${FILE}" &> /dev/null || continue
|
||||||
|
echo "xlint ${FILE}:"
|
||||||
|
xlint $FILE || exit $EX_ERR
|
||||||
|
echo "all clear."
|
||||||
|
done
|
Loading…
Reference in New Issue