From owner-freebsd-questions@FreeBSD.ORG Thu Jan 13 03:32:47 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6696B16A4CE for ; Thu, 13 Jan 2005 03:32:47 +0000 (GMT) Received: from mta13.adelphia.net (mta13.mail.adelphia.net [68.168.78.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACE4C43D41 for ; Thu, 13 Jan 2005 03:32:46 +0000 (GMT) (envelope-from parv@pair.com) Received: from default.chvlva.adelphia.net ([69.160.68.20]) by mta13.adelphia.netESMTP <20050113033245.ISKN5807.mta13.adelphia.net@default.chvlva.adelphia.net>; Wed, 12 Jan 2005 22:32:45 -0500 Received: by default.chvlva.adelphia.net (Postfix, from userid 1000) id 96B10B4F8; Wed, 12 Jan 2005 22:32:35 -0500 (EST) Date: Wed, 12 Jan 2005 22:32:35 -0500 From: Parv To: Christer Solskogen , freebsd-questions@freebsd.org Message-ID: <20050113033235.GA3136@holestein.holy.cow> Mail-Followup-To: Christer Solskogen , freebsd-questions@freebsd.org References: <20050106142257.GA30323@math.jussieu.fr> <41DD8242.8090207@scii.nl> <20050109194634.GA275@holestein.holy.cow> <20050109220353.GB275@holestein.holy.cow> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050109220353.GB275@holestein.holy.cow> Subject: Re: Create tgz packages X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2005 03:32:47 -0000 in message <20050109220353.GB275@holestein.holy.cow>, wrote Parv thusly... > > find /var/db/pkg -mindepth 1 -type d \ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ > | while read port; do pkg_create -b $(basename "$port"); done I made a gross mistake in my above reply related to "-mindepth" option of find(1). I wanted to find all the directories in /var/db/pkg w/o recursion in the directories found. From find(1) ... -mindepth n Always true; do not apply any tests or actions at levels less than n. If any -mindepth primary is specified, it applies to the entire expression even if it would not normally be evaluated. -mindepth 1 processes all but the command line arguments. If there happened to be a sub-directory -- not the case right now -- in one of the ports, then it too would have been passed to the pkg_create(1) command given the quoted text above. Same problem exits in my previous reply in this thread. "-mindepth" needs to be changed to "-maxdepth", as in ... find /var/db/pkg -maxdepth 1 -type d \ | while read port; do pkg_create -b $(basename "$port"); done - Parv --