Sync usage with man page.
[netbsd-mini2440.git] / external / gpl2 / xcvs / dist / contrib / newcvsroot.sh
blobab67187517f0ad604539146201d92b696c000369
1 #! /bin/sh
3 # Copyright 2002 Derek R. Price & Ximbiot <http://ximbiot.com>.
4 # All rights reserved.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
17 # ///// ///// ///// ///// ///// ***** \\\\\ \\\\\ \\\\\ \\\\\ \\\\\
19 # newcvsroot.sh
21 # Recursively change the CVSROOT for a sandbox.
23 # INPUTS
24 # $1 The new CVSROOT
25 # $2+ The list of sandbox directories to convert.
26 # Defaults to the current directory.
28 usage ()
30 echo "$0: usage: $prog newcvsroot [startdir]" >&2
33 prog=`basename "$0"`
35 if test "${1+set}" != set; then
36 usage
37 exit 2
38 else :; fi
40 echo "$1" >/tmp/$prog$$
41 shift
43 for dir in `find "${@:-.}" -name CVS`; do
44 cp /tmp/$prog$$ "$dir"/Root
45 done
47 rm /tmp/$prog$$