Date: Wed, 3 Oct 2001 21:04:00 -0700 From: "Crist J. Clark" <cristjc@earthlink.net> To: "Dan O'Connor" <dan@mostgraveconcern.com> Cc: Ernst de Haan <ernsth@nl.euro.net>, questions@FreeBSD.ORG Subject: Re: Automatically cvsupdating? Message-ID: <20011003210400.N8391@blossom.cjclark.org> In-Reply-To: <047b01c14c73$92122fe0$059b140a@dan>; from dan@mostgraveconcern.com on Wed, Oct 03, 2001 at 06:23:50PM -0700 References: <200110011017.f91AHRE02734@zaphod.euronet.nl> <047b01c14c73$92122fe0$059b140a@dan>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 03, 2001 at 06:23:50PM -0700, Dan O'Connor wrote: > > If I would like to run cvsup every night or so, and have the output sent to > a > > certain email address, how would I do that? > > > This is how I do it every Friday night... > > In /etc/crontab: > > # Run cvsup every Friday night at 10:00 pm. > 0 22 * * 5 root /usr/local/bin/cvsrun | sendmail root > > (Note: change the fifth field ("5") to "*" to get it to run every night. > Change the sendmail target to whatever user you want the email sent to.) > > Then, create an executable file /usr/local/bin/cvsrun: > > echo "Subject: `hostname` weekly cvsup run" > echo "Content-type: text/html" > echo "" > echo "" > echo "<PRE>" > /usr/local/bin/cvsup -g -L 2 /usr/src/stable-supfile > echo "</PRE>" > > This should get you started. The /usr/src/Makefile has this type of functionality built in. See the 'update' target. Put the appropriate settings for, # CVSup update flags. Edit SUPFILE settings to reflect whichever distribution # file(s) you use on your site (see /usr/share/examples/cvsup/README for more # information on CVSup and these files). To use, do "make update" in /usr/src. # #SUP_UPDATE= yes # #SUP= /usr/local/bin/cvsup #SUPFLAGS= -g -L 2 #SUPHOST= cvsup.uk.FreeBSD.org #SUPFILE= /usr/share/examples/cvsup/stable-supfile #PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile #DOCSUPFILE= /usr/share/examples/cvsup/doc-supfile In your /etc/make.conf and edit your supfiles accordingly. Add a line like, # CVSup source code and ports once a week, do it during wee hours Saturday 0 4 * * 6 cvs cd /usr/src; make update >> /var/log/cvsup.log 2>&1 To your /etc/crontab. If you wish to send the output to a specfic email address, pipe the output of the command to the appropriate address rather than the redirects shown. -- Crist J. Clark cjclark@alum.mit.edu cjclark@jhu.edu cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011003210400.N8391>