TracZephyrPlugin: Print more information about changed tickets.
[snippets/.git] / git-rcsimport
1 #!/bin/sh
2 # This is a trivial wrapper around git-cvsimport.
3
4 dir="$1"
5 shift
6 if [ -z "$dir" ]; then
7   echo "Usage: git-rcsimport path/to/dir"
8   exit 1
9 fi
10 if [ ! -d "$dir/RCS" ]; then
11   echo "$dir/RCS does not exist."
12   exit 1
13 fi
14
15 tmpdir=`mktemp -d`
16 mkdir "$tmpdir/CVSROOT"
17 mkdir "$tmpdir/locks"
18 echo "LockDir=$tmpdir/locks" > "$tmpdir/CVSROOT/config"
19 ln -s "`readlink -f "$dir"`/RCS" "$tmpdir/RCS"
20 CVSROOT="$tmpdir" git cvsimport RCS "$@"
21 rm "$tmpdir/RCS" # a bit paranoid about rm -r's competence
22 rm -r "$tmpdir"