From owner-freebsd-stable@FreeBSD.ORG Tue Nov 9 10:39:04 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8285416A4CE for ; Tue, 9 Nov 2004 10:39:04 +0000 (GMT) Received: from raven.kierun.org (raven.yorksj.ac.uk [193.61.234.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3372543D45 for ; Tue, 9 Nov 2004 10:39:04 +0000 (GMT) (envelope-from yann@raven.kierun.org) Received: from yann by raven.kierun.org with local (Exim 4.43 (FreeBSD)) id 1CRTOw-000IBv-C0 for freebsd-stable@freebsd.org; Tue, 09 Nov 2004 10:39:02 +0000 Date: Tue, 9 Nov 2004 10:39:02 +0000 From: Yann Golanski To: freebsd-stable@freebsd.org Message-ID: <20041109103902.GA69223@kierun.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wRRV7LY7NUeQGEoC" Content-Disposition: inline User-Agent: Mutt/1.5.6i Sender: "Yann Golanski,University of York,+44(0)1904-433088" Subject: Portupgrade script. X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Nov 2004 10:39:04 -0000 --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Would people be kind enough to have a look at the following script and tell me what horrors/faux pas/stupid things I have done? =20 The script is an almost automated way to upgrade all your ports to the latest version.=20 Of course, I bet someone else has done this and I'll be told to RTFM. My excuse is that I didn't find it on my own... ;> ###########################################################################= ##### #!/bin/sh # portupgrade script. ### variables. day=3D`date +%d` month=3D`date +%b` year=3D`date +%Y` host=3D`uname -n` ### Variouse ports that need stuff... Where should I put those? # X11 X_WINDOW_SYSTEM=3Dxorg # mutt WITH_MUTT_MBOX_HOOK_PATCH=3Dyes MAIL_GID=3Dmail # rxvt WITH_MOUSEWHEEL=3Dyes WITH_RXVT_SCROLLBAR=3Dyes WITH_MENUBAR=3Dyes # imp3 WITH_APACHE2=3Dyes WITHOUT_LDAP=3Dyes # Aspell ASPELL_EN=3Dyes ### Does what it does... /usr/local/bin/cvsup -g -L 2 /usr/ports/CVSUP less /usr/ports/UPDATING echo '[UPDATING] Do you want to update the port tree? [yn]?' read -p '[y]es or [n]o: ' -e val case ${val} in [yY]) echo 'Updating the port collection now!!!...' ;; [nN]) echo 'Aborting NOW!!!...' exit; ;; *) echo 'What the hell?... I am aborting now.' exit; ;; esac /usr/local/sbin/portaudit -Fda /usr/local/sbin/portsdb -Uu /usr/local/sbin/pkgdb -F /usr/bin/tar ycf /var/db/$year-$month-$day-pkg.tbz2 /var/db/pkg /usr/local/sbin/portupgrade -C -u -v -r -R -P -a -l /usr/ports/LATEST.update cat /usr/ports/LATEST.update | \ sort | \ mail -s "Portupdate $host on $day $month $year" root@$host /usr/local/sbin/portsclean -C -L -P ### reporting. echo '' echo 'This is what has been updated today:' /usr/bin/grep -v '^\-' /usr/ports/LATEST.update | sort=20 echo '' ### EOF ###########################################################################= ##### --=20 yann@kierun.org -=3D*=3D- www.kierun.= org PGP: 009D 7287 C4A7 FD4F 1680 06E4 F751 7006 9DE2 6318 --wRRV7LY7NUeQGEoC Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBkJ5G91FwBp3iYxgRArT/AJ41xHtzU6gDiSlIYi/Irew9run8BwCfXB10 fmlfeiIJVfP6Ai9Dahs5lTg= =Fm+d -----END PGP SIGNATURE----- --wRRV7LY7NUeQGEoC--