--- /dev/null
+#!/bin/sh
+#
+# Post-receive git hook
+#
+
+cd ..
+unset GIT_DIR
+
+if [ -d ".git/annex" ]; then
+ git annex sync
+else
+ git config receive.denyCurrentBranch ignore
+ #git reset HEAD
+ git checkout -f
+fi
+
+git submodule update --init --recursive
+
+cd -
+exec git update-server-info
continue;
fi
+ # If remote destination, add a git post-receive hook
if [ -d "$file/.git" ]; then
git clone $file $file.git && \
+ cp -a $APP_BASE/lib/hydra/hooks/post-receive $file.git/.git/hooks/post-receive && \
rsync -avz $file.git/ $DESTINATION:/var/cache/media/$file/ && \
rm -rf $file.git
else