Guest User

Symlink post-receive hook to all repositories in a directory

a guest
Jul 26th, 2010
421
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.19 KB | None | 0 0
  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;
Advertisement
Add Comment
Please, Sign In to add comment