| Last change
 on this file since 2658 was             2, checked in by bird, 23 years ago | 
        
          | 
Initial revision
 | 
        
          | 
              
Property                 cvs2svn:cvs-rev
 set to                 1.1
Property                 svn:eol-style
 set to                 native
Property                 svn:executable
 set to                 * | 
        
          | File size:
            780 bytes | 
      
      
| Line |  | 
|---|
| 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 |  | 
|---|
| 9 | if [ $# != 3 ]; then | 
|---|
| 10 | echo "usage: `basename $0` <newroot> <modulename> <toplevel directory>" | 
|---|
| 11 | exit 1 | 
|---|
| 12 | fi | 
|---|
| 13 |  | 
|---|
| 14 | root=$1; shift | 
|---|
| 15 | module=$1; shift | 
|---|
| 16 | topdir=$1; shift | 
|---|
| 17 |  | 
|---|
| 18 | rep=${root##*:} | 
|---|
| 19 |  | 
|---|
| 20 | case "$topdir" in | 
|---|
| 21 | /*|./*|../*) echo >&2 "$0 wants relative path from top of checkout"; exit 1;; | 
|---|
| 22 | esac | 
|---|
| 23 |  | 
|---|
| 24 | find $topdir \( -name Repository -o -name Root \) -print | while read f; do | 
|---|
| 25 |  | 
|---|
| 26 | case "$f" in | 
|---|
| 27 | */CVS/Root) echo $root > "$f" ;; | 
|---|
| 28 | */CVS/Repository) | 
|---|
| 29 | r=${module}${f#${topdir}} | 
|---|
| 30 | echo > "$f" $rep/${r%/CVS/Repository} | 
|---|
| 31 | ;; | 
|---|
| 32 | esac | 
|---|
| 33 |  | 
|---|
| 34 | done | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.