Update README. Add check-deploy script and placeholder post-receive
[gitolite-hooks.git] / check-deploy
diff --git a/check-deploy b/check-deploy
new file mode 100755 (executable)
index 0000000..41f2974
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+cd ~/local/gitolite-hooks
+
+HOOK_DIR=~/.gitolite/hooks
+
+
+git pull
+
+for x in *; do
+   if [ "$x" = "check-deploy" ]; then
+      continue
+   elif [ "$x" = "README.md" ]; then 
+      continue
+   fi
+   if [ ! -f $HOOK_DIR/$x ]; then
+      echo "$x doesn't exist in hook dir $HOOK_DIR"
+      continue
+   fi
+   if ! cmp $x $HOOK_DIR/$x; then
+      echo "$x differs from $HOOK_DIR/$x"
+   fi
+done