]> git.phdru.name Git - git-scripts.git/commitdiff
Add post-checkout hook that compiles python files
authorOleg Broytman <phd@phdru.name>
Sun, 5 Jun 2016 11:13:39 +0000 (14:13 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 5 Jun 2016 11:13:39 +0000 (14:13 +0300)
hooks/post-checkout/compyle-all [new file with mode: 0755]

diff --git a/hooks/post-checkout/compyle-all b/hooks/post-checkout/compyle-all
new file mode 100755 (executable)
index 0000000..daf6ab3
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# post-checkout hook that compiles python files to byte code
+
+python2.7 -m compileall -q . &&
+python2.7 -O -m compileall -q .
+
+exit 0