NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Switching to another pkgsrc repository
IT WORKED LIKE A CHARM!
I am so pleased with your script I have quoted it in full. I think
It should get into the wiki. I called it 'Elz.sh'.
You have no idea what a help this is to me. I can't thank you
enough.
On Mon, May 06, 2019 at 03:54:34PM +0700, Robert Elz wrote:
> Then you could use something like
>
> #! /bin/sh
>
> v=
> while getopts p opt
> do
> case "$opt" in
> v) v=-print;;
> *) printf "Usage: $0 [-v] directory\n" >&2
> exit 1
> ;;
> esac
> done
> shift $((OPTIND - 1))
>
> test "$#" -eq 1 || {
> printf "Usage: $0 [-v] directory\n" >&2
> exit 1
> }
> cd "$1" || exit 1
> test -s CVS/Root || {
> printf "No CVS/Root in $1\n" >&2
> exit 1
> }
> printf "Will update tree at %s to use %s\nOK ? " \
> "$1" "$(cat CVS/Root)"
> read ans || exit 1
> case "$ans" in
> [yY]*) ;;
> *) exit 1;
> esac
>
> find . \( -path ./CVS -prune \) -o \
> \( -path '*/CVS/Root' $v -exec cp CVS/Root {} \; \)
Very best regards,
--
Bob Bernstein
Home |
Main Index |
Thread Index |
Old Index