projects
/
git-tools-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
15f659c
)
First argument is source: CVS or GIT repository.
author
Adam Dickmeiss
<adam@indexdata.dk>
Sat, 29 Sep 2007 15:47:18 +0000
(17:47 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Sat, 29 Sep 2007 15:47:18 +0000
(17:47 +0200)
id-cvs-to-git.sh
patch
|
blob
|
history
diff --git
a/id-cvs-to-git.sh
b/id-cvs-to-git.sh
index
aee9f22
..
a7ce39b
100755
(executable)
--- a/
id-cvs-to-git.sh
+++ b/
id-cvs-to-git.sh
@@
-1,6
+1,13
@@
#!/bin/sh
#!/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
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
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
touch ${P}.git/git-daemon-export-ok
echo $DESC > ${P}.git/description
scp -r ${P}.git git.indexdata.com:/var/cache/git