5 usage () { echo >&2 'usage: cvs-adjustroot OLD NEW'; exit 1; }
8 4.--reinvoke) reinvoke=true; shift ;;
10 2.*) reinvoke=false ;;
16 # Copyright 2004 Ian Jackson <ian@chiark.greenend.org.uk>
18 # This script and its documentation (if any) are free software; you
19 # can redistribute it and/or modify them under the terms of the GNU
20 # General Public License as published by the Free Software Foundation;
21 # either version 3, or (at your option) any later version.
23 # chiark-named-conf and its manpage are distributed in the hope that
24 # it will be useful, but WITHOUT ANY WARRANTY; without even the
25 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
26 # PURPOSE. See the GNU General Public License for more details.
28 # You should have received a copy of the GNU General Public License along
29 # with this program; if not, consult the Free Software Foundation's
30 # website at www.fsf.org, or the GNU Project website at www.gnu.org.
38 cmp -- "$filename" <(printf "%s\n" "$old")
39 printf "%s\n" "$new" >"$filename".new
40 mv -f -- "$filename".new "$filename"
44 find -path '*/CVS/Root' -exec cvs-adjustroot --reinvoke "$old" "$new" '{}' ';'