3 if [ ! -d ".git" -a -z "$1" ]; then
4 echo "Usage: $0 repoistory [directories]" >&2
14 if [ ! -d ".git" ]; then
15 echo "$source_dir is not a repoistory (.git isn't found)" >&2
20 dest_dir="`basename \"$source_dir\"`".git &&
21 git clone --bare --config core.sharedRepository=0644 "$source_dir" "$dest_dir" &&
24 git gc --aggressive &&
25 git repack -a -d -f --depth=20 --window=250 &&
27 git config receive.updateserverinfo true && git update-server-info &&
28 cp -p "$HOME"/Internet/WWW/htdocs/git.phdru.name/phdru.name/phdru.name.git/git-daemon-export-ok . &&
29 if [ "`cat \"$source_dir\"/.git/description`" = \
30 "Unnamed repository; edit this file 'description' to name the repository." ]
32 `git var GIT_EDITOR` "$source_dir"/.git/description description
34 cp -p "$source_dir"/.git/description . && chmod a+r description
36 if [ -f "$source_dir"/README.html ]; then
37 cp -p "$source_dir"/README.html . && chmod a+r README.html
40 cd "$HOME"/Internet/WWW/htdocs/git.phdru.name &&
42 if [ -n "$directories" ]; then
43 mkdir -p "$directories"
47 mv "$dest_dir" "$HOME"/Internet/WWW/htdocs/git.phdru.name/"$directories" &&
48 echo "$HOME"/Internet/WWW/htdocs/git.phdru.name/"$directories/$dest_dir" >> "$HOME"/prog/git-scripts/locate-all.list &&
52 if [ -n "$directories" ]; then
53 dest_dir="$directories/$dest_dir"
55 git remote add web "$HOME"/Internet/WWW/htdocs/git.phdru.name/"$dest_dir" &&
56 exec git push --set-upstream web master