Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Oct 1997 22:18:25 +0100
From:      James Raynard <fdocs@jraynard.demon.co.uk>
To:        Christopher Allen <gmfangs@asmrb.org>
Cc:        freebsd-doc@freebsd.org
Subject:   Re:Problem based on Handbook answer
Message-ID:  <19971021221825.19739@jraynard.demon.co.uk>
In-Reply-To: <v03110700b07146bbe92c@lr8e1-port6.zocalo.net>; from Christopher Allen on Mon, Oct 20, 1997 at 10:42:03AM -0700
References:  <v03110716b07072d9aada@lr8e1-port1.zocalo.net> <v03110716b07072d9aada@lr8e1-port1.zocalo.net> <199710201527.IAA26236@coven.queeg.com> <v03110700b07146bbe92c@lr8e1-port6.zocalo.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 20, 1997 at 10:42:03AM -0700, Christopher Allen wrote:
> At 8:27 AM -0700 10/20/97, Brion Moss wrote:
> >In order to unpack it you need to give tar the "z" argument
> >(e.g., "tar xzvf" instead of "tar xvf").
> 
> Someone should correct the handbook on this one ;-)

It's already correct (it says "tar xzf", not "tar xvf").

> >2) The canonical way to do this is to use the ctm mailing lists to
> 
> Can you point me to a handbook link for this? I couldn't find it.

See the "Staying Current with FreeBSD" link.

> >Or, you could write a script that looks like this:
> >
> >	#!/bin/sh
> >	# Fetch the new ports into /tmp
> >	cd /tmp
> >	fetch ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/ports.tar.gz
> 
> My understanding was that if I did this it would also grab all the contents
> of the ports/distfiles/ directory as well

Correct.  It may well fill up your root partition as well :-)

> Is there someway to get all the skeletons and not the
> ports/distfiles/ directory without seperately downloading each subdirectory
> of ports/?

Maybe something like:

#!/bin/sh

# Go to ports directory
cd /usr/ports

# Create backup directory (clear out anything that was already there)
rm -rf ../ports.old
mkdir ../ports.old

# Update skeletons
for i in *; do
    if [ -d $i -a $i != distfiles ]; then
        # Backup old one
        mv $i ../ports.old
        # Download new one
        fetch ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/ports/$i.tar.gz
    fi
done

# Remove backups
rm -rf ../ports.old

DISCLAIMER: the above is just me thinking aloud in the hope it'll
inspire someone to do the job properly.  (For starters, it doesn't
do any error checking and may well have syntax/logic errors in it).

DO NOT RUN IT as it stands!

-- 
James Raynard, Edinburgh, Scotland.
james@jraynard.demon.co.uk
http://www.freebsd.org/~jraynard/



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