4 echo "Usage: $0 repoistory [directories]" >&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 --bare --config core.sharedRepository=0644 "$source_dir" "$dest_dir" &&
21 git gc --aggressive &&
22 git repack -a -d -f --depth=20 --window=250 &&
24 git config receive.updateserverinfo true && git update-server-info &&
25 cp -p "$HOME"/Internet/WWW/htdocs/git.phdru.name/phdru.name/phdru.name.git/git-daemon-export-ok . &&
26 if [ "`cat \"$source_dir\"/.git/description`" = \
27 "Unnamed repository; edit this file 'description' to name the repository." ]
29 `git var GIT_EDITOR` "$source_dir"/.git/description description
31 cp -p "$source_dir"/.git/description . && chmod a+r description
33 if [ -f "$source_dir"/README.html ]; then
34 cp -p "$source_dir"/README.html . && chmod a+r README.html
37 cd "$HOME"/Internet/WWW/htdocs/git.phdru.name &&
39 if [ -n "$directories" ]; then
40 mkdir -p "$directories"
44 mv "$dest_dir" "$HOME"/Internet/WWW/htdocs/git.phdru.name/"$directories" &&
45 echo "$HOME"/Internet/WWW/htdocs/git.phdru.name/"$directories/$dest_dir" >> "`dirname \"$0\"`"/locate-all.list &&
49 if [ -n "$directories" ]; then
50 dest_dir="$directories/$dest_dir"
52 git remote add web "$HOME"/Internet/WWW/htdocs/git.phdru.name/"$dest_dir" &&
53 exec git push --set-upstream web master