new-repo.sh (386B)
1 #!/bin/sh 2 3 set -e 4 5 cd $(dirname $0) 6 7 for name in $@; do 8 dir="../$name.git" 9 url="ssh://osh@192.168.2.6:/~/git/$name.git" 10 11 mkdir $dir 12 pushd $dir 13 git init --bare 14 popd 15 16 17 echo "Oshgnacknak" > $dir/owner 18 echo $url > $dir/url 19 ${EDITOR:-vi} $dir/description 20 ln -sr post-receive.sh $dir/hooks/post-receive 21 22 ./build.sh $dir 23 echo "Clone: $url" 24 done