From owner-freebsd-questions@FreeBSD.ORG Mon Jun 25 20:07:29 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1723616A469 for ; Mon, 25 Jun 2007 20:07:29 +0000 (UTC) (envelope-from oregnier@oregnier.net) Received: from 30.mail-out.ovh.net (30.mail-out.ovh.net [213.186.62.213]) by mx1.freebsd.org (Postfix) with SMTP id 8463713C468 for ; Mon, 25 Jun 2007 20:07:28 +0000 (UTC) (envelope-from oregnier@oregnier.net) Received: (qmail 23872 invoked by uid 503); 25 Jun 2007 20:07:48 -0000 Received: (QMFILT: 1.0); 25 Jun 2007 20:07:48 -0000 Received: from b7.ovh.net (HELO mail185.ha.ovh.net) (213.186.33.57) by 30.mail-out.ovh.net with SMTP; 25 Jun 2007 20:07:48 -0000 Received: from b0.ovh.net (HELO queue-out) (213.186.33.50) by b0.ovh.net with SMTP; 25 Jun 2007 20:07:22 -0000 Received: from mac76-2-82-241-6-173.fbx.proxad.net (HELO ?127.0.0.1?) (postmaster@oregnier.net@82.241.6.173) by ns0.ovh.net with SMTP; 25 Jun 2007 20:07:21 -0000 Message-ID: <4680210D.5020600@oregnier.net> Date: Mon, 25 Jun 2007 22:09:49 +0200 From: Olivier Regnier User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: Daniel Bye References: <467FD67B.9070604@oregnier.net> <46800849.5040402@slightlystrange.org> In-Reply-To: <46800849.5040402@slightlystrange.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Ovh-Remote: 82.241.6.173 (mac76-2-82-241-6-173.fbx.proxad.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|H 0.5/N Cc: freebsd-questions@freebsd.org Subject: Re: script to update my ports tree X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2007 20:07:29 -0000 Daniel Bye a écrit : > Olivier Regnier wrote: > >> Hi everyone, >> >> I made a shell script in /etc/periodic/daily/610.update-ports-tree and >> in my /etc/periodic.conf, this line : daily_update_ports_tree_enable="YES". >> >> The problem is simple, my script doesn't start at all. >> >> Can you help me please ? >> >> Thank you :) >> > > > There is a syntax error in the script - you have missed the ;; from the > end of the first case statement. Try putting that in and see what > happens. You need something like this, or the script will just fall off > the last case statement, which does nothing: > > case $var in > yes) > do stuff here > ;; > *) ;; > esac > > > Also, you can simplify the script somewhat - you don't need to jump > through all those hoops with sed and awk to create a supfile on the fly > - just put this in your /etc/make.conf file, which does the same as your > selectserver() function: > > SUP_UPDATE= yes > SUP= /usr/bin/csup > SUPFLAGS= -g > SUPHOST= `/usr/local/bin/fastest_cvsup -Qc uk,fr,nl` > SUPFILE= /etc/cvsup/system > > The -Q option to fastest_cvsup returns just the hostname of the fastest > server, so no need to set up an enormous pipeline of tools. Alter the > rest of the script to call 'make update' from /usr/ports, and you're done. > > Alternatively, you can use portsnap(8) instead - it automatically > selects one of the available mirrors and uses it. However, you will need > to do a bit of work to set this up - remove your ports tree (no, > seriously - follow along, this is good), then run: > > # portsnap fetch extract > > Now your script just needs to call > > # portsnap fetch update > > and that's it. This has the advantage that you don't need to cd to > /usr/ports for it to work. > > HTH, one way or another... > > Dan > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > Hello, thank you for theses informations :)