a7ce39b3c947b6e7a3fa3dbaea793a006df80e02
[git-tools-moved-to-github.git] / id-cvs-to-git.sh
1 #!/bin/sh
2 # Upload NEW Git Project to master.
3 SRC=$1
4 P=$2
5 DESC="$3"
6
7 if test -z "$SRC"; then
8         echo "Missing Source (CVS=get from CVS)"
9         exit 1
10 fi
11 if test -z "$P"; then
12         echo "Missing Project"
13         exit 1
14 fi
15 if test -z "$DESC"; then
16         echo "Missing Description"
17         exit 1
18 fi
19 if test "$SRC" = "CVS"; then
20         rm -fr import_project
21         mkdir import_project
22         cd import_project
23         git-cvsimport -A ../import.names -v $P
24         cd ..
25         git clone --bare import_project ${P}.git
26 else
27         git clone --bare ${SRC} ${P}.git
28 fi
29 touch ${P}.git/git-daemon-export-ok
30 echo $DESC > ${P}.git/description
31 scp -r ${P}.git git.indexdata.com:/var/cache/git