Date: Sun, 17 Nov 2002 23:01:38 +0900 From: SADA Kenji <sada@BSDclub.org> To: Mike Jeays <Mike.Jeays@rogers.com> Cc: sada@BSDclub.org, freebsd-chat@FreeBSD.ORG Subject: Re: PKG-ADD suggestion Message-ID: <20021117230138.1c1e987d.sada@BSDclub.org> In-Reply-To: <3DD03FDF.5020302@rogers.com> References: <3DD03FDF.5020302@rogers.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 11 Nov 2002 18:40:15 -0500 Mike Jeays <Mike.Jeays@rogers.com> wrote: > It would be useful if pkg_add had an option that made it store a > copy of the tarball on the local machine whenever it had to > fetch it with FTP. FYI: I wrote a simple script to fetch packages with dependencies. -- #!/bin/sh # ex:ts=4 FETCH_CMD=${FETCH_CMD:-fetch} if [ $# -eq 0 ]; then echo "usage: ${0##*/} URL_of_a_package [..]" exit 0; fi a_pkg () { base=${1%/*/*} pkg=${1##*/} if [ ! -e $pkg ]; then $FETCH_CMD $base/All/$pkg fi if [ -e $pkg ]; then for p in `tar xzfO ${pkg} '+CONTENTS'|grep '^@pkgdep'|awk '{printf("%s ",$2)}'`; do if [ ! -e $p.tgz ]; then a_pkg $base/All/$p.tgz fi done else echo "(XX) $pkg: couldn't be fetched." fi } for p in $*; do a_pkg $p done -- SADA Kenji To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021117230138.1c1e987d.sada>