From: Adam Dickmeiss Date: Sat, 29 Sep 2007 15:47:18 +0000 (+0200) Subject: First argument is source: CVS or GIT repository. X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=2563a2c7e2ca7b80c70da64c3dc7275062a48d16;p=git-tools-moved-to-github.git First argument is source: CVS or GIT repository. --- diff --git a/id-cvs-to-git.sh b/id-cvs-to-git.sh index aee9f22..a7ce39b 100755 --- a/id-cvs-to-git.sh +++ b/id-cvs-to-git.sh @@ -1,6 +1,13 @@ #!/bin/sh -P=$1 -DESC="$2" +# Upload NEW Git Project to master. +SRC=$1 +P=$2 +DESC="$3" + +if test -z "$SRC"; then + echo "Missing Source (CVS=get from CVS)" + exit 1 +fi if test -z "$P"; then echo "Missing Project" exit 1 @@ -9,12 +16,16 @@ if test -z "$DESC"; then echo "Missing Description" exit 1 fi -rm -fr import_project -mkdir import_project -cd import_project -git-cvsimport -A ../import.names -v $P -cd .. -git clone --bare import_project ${P}.git +if test "$SRC" = "CVS"; then + rm -fr import_project + mkdir import_project + cd import_project + git-cvsimport -A ../import.names -v $P + cd .. + git clone --bare import_project ${P}.git +else + git clone --bare ${SRC} ${P}.git +fi touch ${P}.git/git-daemon-export-ok echo $DESC > ${P}.git/description scp -r ${P}.git git.indexdata.com:/var/cache/git