2 # This is a trivial wrapper around git-cvsimport.
7 echo "Usage: git-rcsimport path/to/dir"
10 if [ ! -d "$dir/RCS" ]; then
11 echo "$dir/RCS does not exist."
15 tmpdir=`mktemp -d -t git-rcsimport`
16 mkdir "$tmpdir/CVSROOT" "$tmpdir/locks" "$tmpdir/rcs"
17 echo "LockDir=$tmpdir/locks" > "$tmpdir/CVSROOT/config"
18 absdir=`cd "$dir"; pwd`
19 (cd "$absdir"; find . -name RCS -type d) | while read dir; do
20 rcsdir=$tmpdir/rcs/`dirname "$dir"`
22 ln -s "$absdir/$dir"/* "$rcsdir"
24 CVSROOT="$tmpdir" git cvsimport "$@" rcs