From 2563a2c7e2ca7b80c70da64c3dc7275062a48d16 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Sat, 29 Sep 2007 17:47:18 +0200 Subject: [PATCH] First argument is source: CVS or GIT repository. --- id-cvs-to-git.sh | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) 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 -- 1.7.10.4