From owner-freebsd-stable Thu May 27 11: 6: 3 1999 Delivered-To: freebsd-stable@freebsd.org Received: from freed.dyn.ez-ip.net (derby.JSP.UMontreal.CA [132.204.45.26]) by hub.freebsd.org (Postfix) with ESMTP id C14F114F8E for ; Thu, 27 May 1999 11:05:43 -0700 (PDT) (envelope-from spidey@jsp.umontreal.ca) Received: from localhost (spidey@localhost) by freed.dyn.ez-ip.net (8.9.3/8.9.3) with ESMTP id OAA01473; Thu, 27 May 1999 14:05:32 -0400 (EDT) (envelope-from spidey@jsp.umontreal.ca) X-Authentication-Warning: freed.dyn.ez-ip.net: spidey owned process doing -bs Date: Thu, 27 May 1999 14:05:32 -0400 (EDT) From: Spidey X-Sender: spidey@freed.dyn.ez-ip.net Reply-To: Spidey To: "I'Khala" Cc: Broderick Wood , freebsd-stable@FreeBSD.ORG Subject: Re: CVSUP Scripts In-Reply-To: <19990526154059.B42978@phoenix.cl.msu.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG If anyone cares.... for the cvsup part, I made an scripts that automates the process of upgrading the sources: It is very stupid and simple, but it saves me some time, and it keeps all the mods made to the source tree logged somewhere with a timestamp in the name. Just do, say, ./update ports to update the tree as per the ports-supfile and log the results in ./logs/ports-`date +%Y%m%d` Gimme your comments please! ---------------------------------------------------------------------------- #! /bin/sh cvsup="/usr/local/bin/cvsup" flags="-P m -L 2 -g -h" host="cvsup.ca.freebsd.org" curDir="." logdir="$curDir/logs" date=`date +%Y%m%d` nolog=0 verbose=1 # A basic usage... usage ( ) { cat <] [ -d ] collection -q: be quiet -n: do not log to a file -l : log into dir -d : change the date format used for logfile name ["$date"] The supfile will be -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 "This will be the command 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 ---------------------------------------------------------------------- On Wed, 26 May 1999, I'Khala wrote: > Quoting Broderick Wood (bwood@KingsU.ab.ca): > > Some of the recent comments have me wondering what people have > > done to automate the process of staying current with -STABLE using > > CVSUP. I am already doing a CVSUP and make buildworld on a > > weekly basis. What else can I get the scripts to do without killing the > > box while I'm away, and what steps are then left? > > > > I would prefer to hear about people who are actually using their > > scripts, not just "This SHOULD Work" scenarios... > What I've done is the following > 1. created a file in /etc/periodic/daily called 800.update-sources > 2. 800.update-sources calls the script /usr/local/etc/sources > 3. /usr/local/etc/sources does a 'cd /usr/src' and performs an 'make update' > 4. in /etc/make.conf I have 'SUPFILE=/usr/local/etc/cvsup/stable-supfile', > 'SUPFILE1=/usr/local/etc/cvsup/ports-supfile' > > Pretty simple. Just use any of the scripts in '/etc/periodic/daily' as an example. > I usually do a buildworld & installworld by hand, but I'm going to begin a weekly > automated buildowrld on my -CURRENT boxes, because I'm finding out that this would > be the most prudent thing for me ... #;^) > > HTH > > > --------------------------- > > > > -BMW- > > > > Don't just stand there! Pray something! > > > > (bwood@kingsu.ab.ca) > > Broderick Wood, > > Director of Information Technology Services > > The King's University College > > 9125 - 50 Street > > Edmonton, Alberta > > T6B 2H3 > > (780) 465-8315 > > (780) 465-3534 (FAX) > > > > i'khala > (Still thinking of a witty .signature file ... #;^) > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-stable" in the body of the message > Un éducateur dans l'âme ne prend rien au sérieux que par rapport à ses disciples -- soi-même non excepté. -Nietzsche, "Par delà le bien et le mal" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message