#!/bin/sh
-# Upload NEW Git Project to master.
+# id-cvs-to-git.sh: Creates new bare Git Project from CVS
+#
+usage() {
+ cat <<EOF
+Usage:
+id-cvs-to-git.sh source project description
+
+ source: is a GIT project source or 'CVS'
+ project: is the GIT project name (destination) and project source (If CVS)
+ description: description for the project
+
+ Convert YAZ from CVS to Git
+ id-cvs-to-git.sh CVS yaz "Yet another Z39.50 toolkit"
+
+ Make bare new Git project from existing Git repo ../newproject
+ id-cvs-to-git.sh ../newproject newproject "My new project"
+EOF
+}
+
SRC=$1
P=$2
DESC="$3"
if test -z "$SRC"; then
- echo "Missing Source (CVS=get from CVS)"
+ usage
exit 1
fi
if test -z "$P"; then
- echo "Missing Project"
+ echo "Error: Missing Project"
+ usage
exit 1
fi
if test -z "$DESC"; then
- echo "Missing Description"
+ echo "Error: Missing Description"
+ usage
exit 1
fi
if test "$SRC" = "CVS"; then
rm -fr import_project
mkdir import_project
cd import_project
- git-cvsimport -A ../import.names -v $P
+ git-cvsimport -u -A ../import.names -v $P
cd ..
git clone --bare import_project ${P}.git
else
fi
touch ${P}.git/git-daemon-export-ok
echo $DESC > ${P}.git/description
-scp -r ${P}.git git.indexdata.com:/var/cache/git