Added a description for my extensions (README-my-extensions.html).
[parsecvs/imz-RCS2git-use-cases.git] / RCS2git-use-cases / parseRCS-merging-init
blobd790b88a7c9f44e250f2cbf8d10e46c9c9a7fecd
1 #!/bin/bash
3 # Requires the helpers from my "git-shortcuts" collection
4 # (http://gitorious.org/projects/git-shortcuts
5 # or http://repo.or.cz/w/git-shortcuts.git ).
7 # Ivan Zakharyaschev imz at altlinux dot org, March--April 2009.
8 # I publish it under GPLv2 or later (as parsecvs is published).
10 usage() {
11 printf $"Usage: %s TAG [ ... ]\n" "$0"
12 echo $"Uses parsecvs to parse RCS/* and merge the initial commits tagging the result TAG."
13 echo $"Recommended TAG: something like RCS-all-init."
16 if [[ $# == 0 ]]; then
17 usage
18 exit 1
21 case "$1" in
22 -*)
23 usage
24 exit 1
26 esac
28 set -e
30 # The tag which will refer to the commit.
31 TAG="$1"
32 shift
33 # Other options are passed to parsecvs.
35 parseRCS-indep "$@"
36 printf $"Merged initial RCS states with the help of %s.\n" "$0" \
37 | git mread-and-commit "$TAG" \
38 $(git heads-for-merge | xargs git roots-of-hist)