X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;ds=sidebyside;f=id-new-project%2Fid-new-project.sh;h=3fa1bccbe7288fd3a13c8ca8392e8402886710c6;hb=5df9e4d681e83f0a5720ca98e62865d1150573e7;hp=42d94105fd3896023122bd30c7da7c5984920c4a;hpb=4899d5ff358df3d3a668e3439b834b8800e97ae5;p=git-tools-moved-to-github.git diff --git a/id-new-project/id-new-project.sh b/id-new-project/id-new-project.sh index 42d9410..3fa1bcc 100755 --- a/id-new-project/id-new-project.sh +++ b/id-new-project/id-new-project.sh @@ -1,10 +1,11 @@ #!/bin/sh usage() { + echo "" echo "Usage:" - echo "id-new-git.sh srcdir description {pub/private}" + echo "id-new-project.sh srcdir description {pub/private/admin}" echo "For example:" - echo "id-new-git.sh ../myproj \"Which does good things\" private" + echo "id-new-project.sh ../myproj \"Which does good things\" private" exit 1 } @@ -12,12 +13,13 @@ SRC=$1 DESC=$2 TYPE=$3 -if test -z "${TYPE}"; then - usage -fi +case "${TYPE}" in + pub | private | admin ) ;; + * ) echo "invalid type: '$TYPE', use pub or private or admin "; usage ;; +esac -if test ! -e post-receive-email-id; then - echo "file post-receive-email-id must be in current directory" +if test ! -e post-receive; then + echo "file post-receive must be in the current directory" exit 1 fi @@ -34,11 +36,12 @@ if git clone --bare $SRC ${PROJ}.git; then touch git-daemon-export-ok echo "${DESC}" >description git config core.sharedRepository true - cp ../post-receive-email-id hooks/post-receive + git config core.ignorecase true + cp ../post-receive hooks/post-receive chmod +x hooks/post-receive git config hooks.mailinglist gitid@indexdata.dk cd .. - scp -r ${PROJ}.git git.indexdata.com:/home/git/${TYPE} - ssh git.indexdata.com "cd /home/git/${TYPE}/${PROJ}.git && chmod -R g+w . && chgrp -R git . && find . -type d | xargs chmod g+s" + scp -P 222 -r ${PROJ}.git git.indexdata.com:/home/git/${TYPE} + ssh -p 222 git.indexdata.com "cd /home/git/${TYPE}/${PROJ}.git && chmod -R g+w . && chgrp -R git . && find . -type d | xargs chmod g+s" fi