4 echo "Usage: $0 repoistory" >&2
9 cd "$1" && source_dir="`pwd`" &&
11 if [ ! -d ".git" ]; then
12 echo "$source_dir is not a repoistory (.git isn't found)" >&2
17 dest_dir="`basename \"$source_dir\"`".git &&
18 git clone --mirror --config core.sharedRepository=0644 "$source_dir" "$dest_dir" &&
21 git gc --aggressive && git fsck --strict &&
22 cp -p hooks/post-update.sample hooks/post-update && hooks/post-update &&
23 cp -p "$HOME"/Internet/WWW/htdocs/git.phdru.name/phdru.name.git/git-daemon-export-ok . &&
24 if [ "`cat \"$source_dir\"/.git/description`" = \
25 "Unnamed repository; edit this file 'description' to name the repository." ]
27 "${VISUAL:-${EDITOR:-vi}}" "$source_dir"/.git/description description
29 cp -p "$source_dir"/.git/description . && chmod a+r description
31 if [ -f "$source_dir"/README.html ]; then
32 cp -p "$source_dir"/README.html . && chmod a+r README.html
36 mv "$dest_dir" "$HOME"/Internet/WWW/htdocs/git.phdru.name &&
40 exec git remote add --mirror=push web "$HOME"/Internet/WWW/htdocs/git.phdru.name/"$dest_dir"