#!/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
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
+scp -r ${P}.git git.indexdata.com:/home/git/pub