]> gcc.gnu.org Git - gcc.git/blame - contrib/newcvsroot
gcc_build: Output information about the commands used to configure the compiler.
[gcc.git] / contrib / newcvsroot
CommitLineData
f4ae3f9b
ML
1#! /usr/bin/env bash
2# Written by Roland McGrath <roland@gnu.org>
3
4# Replaces all CVS/Root and CVS/Repository files in a checked-out CVS
5# tree. Requires shell with # and % variable substitution (e.g. bash).
6
7# Usage: newcvsroot <newroot> <modulename> <toplevel directory>
8
05e1739f
GP
9if [ $# != 3 ]; then
10 echo "usage: `basename $0` <newroot> <modulename> <toplevel directory>"
11 exit 1
12fi
13
f4ae3f9b
ML
14root=$1; shift
15module=$1; shift
16topdir=$1; shift
17
18rep=${root##*:}
19
20case "$topdir" in
21/*|./*|../*) echo >&2 "$0 wants relative path from top of checkout"; exit 1;;
22esac
23
24find $topdir \( -name Repository -o -name Root \) -print | while read f; do
25
26case "$f" in
84d6d72f 27*/CVS/Root) echo $root > "$f" ;;
f4ae3f9b
ML
28*/CVS/Repository)
29 r=${module}${f#${topdir}}
84d6d72f 30 echo > "$f" $rep/${r%/CVS/Repository}
f4ae3f9b
ML
31 ;;
32esac
33
34done
This page took 0.12399 seconds and 5 git commands to generate.