Share Pastebin
Guest
Public paste!

Symlink post-receive hook to all repositories in a directory

By: a guest | Jul 26th, 2010 | Syntax: Bash | Size: 0.19 KB | Hits: 81 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. #!/bin/sh
  2. for dir in `ls -d */`; do
  3.     target="$PWD"/"$dir""hooks/post-receive";
  4.     if [ -f $target ]; then
  5.         rm $target;
  6.     fi;
  7.     ln -s $PWD/post-receive $target;
  8. done;