[local/dovecot-user-add] ~correction champ from du courriel de bienvenu
[lhc/ateliers.git] / host / git-configure
1 #!/bin/sh -eu
2 tool=$(readlink -e "${0%/*}/..")
3 . "$tool"/host/lib.sh
4
5 cd "$tool"
6 git config --replace branch.master.remote .
7 git config --replace branch.master.merge refs/remotes/master
8 local tool
9 tool=$(cd "$tool"; cd -)
10 install -m 770 /dev/stdin \
11 .git/hooks/post-update <<-EOF
12 #!/bin/sh -efux
13 case \$1 in
14 (refs/remotes/master)
15 cd ..
16 #git --git-dir=\$PWD/.git checkout -f -B master remotes/master &&
17 git --git-dir=\$PWD/.git checkout HEAD'^' &&
18 git --git-dir=\$PWD/.git branch -f master remotes/master &&
19 git --git-dir=\$PWD/.git checkout master
20 git --git-dir=\$PWD/.git clean -f -d -x
21 ;;
22 esac
23 EOF