Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Mar 2000 11:10:35 -0500 (EST)
From:      Spidey <beaupran@iro.umontreal.ca>
To:        chad@DCFinc.com
Cc:        andrews@technologist.com (Will Andrews), blk@skynet.be, freebsd-stable@FreeBSD.ORG
Subject:   Re: cd /usr/src; make update?
Message-ID:  <14537.7803.527481.657944@anarcat.dyndns.org>
References:  <20000308115928.D424@argon.blackdawn.com> <200003082041.NAA26494@freeway.dcfinc.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--pnfpg3O/ye
Content-Type: text/plain; charset=us-ascii
Content-Description: message body text
Content-Transfer-Encoding: 7bit

I prefered a shell script like:


--pnfpg3O/ye
Content-Type: text/plain
Content-Disposition: inline;
	filename="update"
Content-Transfer-Encoding: 7bit

#! /bin/sh

cvsup="/usr/local/bin/cvsup"
flags="-P m -L 2 -g -h"
host="cvsup4.freebsd.org"
curDir=.
logdir="$curDir/logs"
date=`date +%Y%m%d`
nolog=0
verbose=1

# A basic usage...
usage ( ) {
    cat <<EOF
Usage: update [-q] [-n | -l <logdir>] [ -d <fmt> ] collection
-q: be quiet
-n: do not log to a file
-l <logdir>: log into dir <logdir>
-d <fmt>: change the date format used for logfile name ["$date"]
The supfile will be <collection>-supfile.
EOF
    exit 1
}

if test $# -lt 1
then usage
fi

# Get the command line right!
#set -- `getopt nl:qv $*`

#for i
#do
#    case "$i"
#    in
#	-q)
#		verbose=0; shift;;
#	-v)
#		verbose=1; shift;;
#	-n)
#		nolog=1; shift;;
#	-l)
#		logdir=$2; shift; shift;;
#	-d)
#		date=$2; shift; shift;;
#    esac
#done

dist=$1
supfile="$curDir/$dist-supfile"

if [ ! -r $supfile ]
then
	echo "Can't read $supfile, exiting..."
	exit 1
fi

if [ ! -d $logdir ]
then
	echo "Can't find $logdir directory, using current dir for logfiles"
	logdir="."
fi

if [ $nolog -eq 1 ]
then 
	logfile="/dev/null"
else
	logfile="$logdir/$dist-$date"
fi

echo "The following command will be issued:"
echo "\"$cvsup $flags $host $supfile 2>&1 | tee -a $logfile\""
echo -n "Press [enter] to confirm, or ^C to exit: "
read void

if [ $verbose -eq 1 ]
then
	$cvsup $flags $host $supfile 2>&1 | tee -a $logfile
else
	$cvsup $flags $host $supfile 2>&1 >> $logfile
fi

--pnfpg3O/ye
Content-Type: text/plain; charset=us-ascii
Content-Description: message body and .signature
Content-Transfer-Encoding: 7bit



--- At 13:41 of March 8, Big Brother made Chad R. Larson write:
 > As I recall, Will Andrews wrote:
 > > On Wed, Mar 08, 2000 at 09:32:30AM -0700, Chad R. Larson wrote:
 > > > I put my CVSup files in a seperate directory (/usr/sup).  I have
 > > > files for src doc and ports, and run the CVSup's by hand before
 > > > doing a "make world".
 > > 
 > > This is precisely the same method I use to update my -CURRENT and -STABLE
 > > sources as well as my CVS repository.
 > > 
 > > I customize them as far as needed, then I just run
 > >         # cd /usr/sup && cvsup <supfile>
 > 
 > Though my command looks like
 > 
 >     #!/bin/csh
 >     echo "CVSup started at `date`" > SupLog
 >     cvsup -P- -L2 -g cvsupfile >>& SupLog
 >     echo "CVSup completed at `date`" >> SupLog
 > 
 > 
 > 	-crl
 > --
 > Chad R. Larson (CRL15)   602-953-1392   Brother, can you paradigm?
 > chad@dcfinc.com         chad@larsons.org          larson1@home.net   
 > DCF, Inc. - 14623 North 49th Place, Scottsdale, Arizona 85254-2207
 > 
 > 
 > To Unsubscribe: send mail to majordomo@FreeBSD.org
 > with "unsubscribe freebsd-stable" in the body of the message

-- 
Si l'image donne l'illusion de savoir
C'est que l'adage pretend que pour croire,
L'important ne serait que de voir

Lofofora

--pnfpg3O/ye--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14537.7803.527481.657944>