Re: [Chromium-dev] SourceForge CVS changes
Sean Ahern <[email protected]> Tue, 16 May 2006 11:39:40 -0400
| Newsgroups | gmane.comp.graphics.chromium.user,gmane.comp.graphics.chromium.devel |
|---|---|
| Message-ID | <[email protected]> |
I haven't tried it, but wouldn't this work as a one-liner?
% find . -name Root -print | perl -pi.bak -e 's/cvs/chromium.cvs/g'
-Sean
--
Sean Ahern
Oak Ridge National Laboratory
On May 16, 2006, at 11:07 AM, Robert Ellison wrote:
>> If you want to update all the CVS/Root files in your current CVS
>> tree, replace the old hostname:
>> cvs.sourceforge.net
>> with the new one:
>> chromium.cvs.sourceforge.net
>> Maybe someone handy with shells scripts can post a 'find/sed'
>> command to do this.
> $ cd <chromiumDirectory>
> $ cvsmv cvs.sourceforge.net chromium.cvs.sourceforge.net
>
> Bob Ellison
> Self-proclaimed Script Meister
> Tungsten Graphics, Inc.
> #!/bin/bash
> prog=${0##*/}
>
> #
> # Things to do if you catch an interrupt
> #
> trap "rm -f /tmp/$prog$$*" 0
> trap "rm -f /tmp/$prog$$*; exit 2" 1 2 3 15
>
> #
> # Set variables to default values
> #
> verbose=no
> directory=.
> tmpFileList=/tmp/$prog$$A
> tmpEditedFile=/tmp/$prog$$B
>
> #
> # Parse command-line options
> #
>
> options=":hxd:"
> while getopts "$options" arg
> do
> case "$arg" in
> h) {
> echo "Usage: $prog [-${options#:}] /old-cvsroot /new-cvsroot"
> echo "Change all references in CVS/Root files from the old CVS
> root to the new one"
> echo "-h gives help"
> echo "-x for debug"
> echo "-d specifies directory [$directory]"
> } 1>&2
> exit 1
> ;;
> x) verbose=yes ; set -x ;;
> :) echo "$prog: $OPTARG requires an argument. Use -h for help."
> 1>&2
> exit 2
> ;;
> *) {
> echo "$prog: unknown option '$OPTARG'. Use -h for help."
> } 1>&2
> exit 2
> esac
> done
> shift $(($OPTIND - 1))
>
> if [ $# -ne 2 ]; then
> echo "$prog: need exactly 2 arguments. Use -h for help." 1>&2
> exit 2
> fi
>
> # Get all the files that refer to the old CVS root
> find $directory -path '*CVS/Root' | xargs grep -l $1 > $tmpFileList
>
> # Edit them one at a time.
> cat $tmpFileList | while read file; do
> sed -e "s%$1%$2%g" < $file > $tmpEditedFile
> mv $tmpEditedFile $file
> done
>
>
> exit 0
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642