From owner-freebsd-ports@FreeBSD.ORG Tue Jan 24 18:26:58 2006 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F2B8716A42B for ; Tue, 24 Jan 2006 18:26:57 +0000 (GMT) (envelope-from swhetzel@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C89D43D53 for ; Tue, 24 Jan 2006 18:26:56 +0000 (GMT) (envelope-from swhetzel@gmail.com) Received: by xproxy.gmail.com with SMTP id s9so886060wxc for ; Tue, 24 Jan 2006 10:26:55 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YEC+ERJozAXkoQ9Y/ap2+UiL6uFXaCWa+odzSpo9T5tolvKZCSAOe8ersav+rDeWjaRvornWeiaPsTnYml7BmpLdPXhTV0C8SZMrvtLVvE81b3vuJjYGub9WwPhcbLNWiPzAGRR2SqhPiOl96vLk9kztC0nDZQocJnTbTWmfvmE= Received: by 10.70.75.11 with SMTP id x11mr7662129wxa; Tue, 24 Jan 2006 10:26:55 -0800 (PST) Received: by 10.70.53.2 with HTTP; Tue, 24 Jan 2006 10:26:55 -0800 (PST) Message-ID: <790a9fff0601241026s3f4e7f09k92ab1de2cd974b5d@mail.gmail.com> Date: Tue, 24 Jan 2006 12:26:55 -0600 From: Scot Hetzel To: "Andrew P." In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: Cc: FreeBSD Ports Subject: Re: cp -n vs. test -f X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jan 2006 18:26:58 -0000 On 1/24/06, Andrew P. wrote: > So why do we use "if [ ! -f file ] ; then cp file.new file; fi" > instead of "cp -n file.new file" in pkg-plist's and many > other places? I think the "cp -n" way is what we really > mean to do. > We probably don't use it because of the following at the bottom of the cp man page. "The -v and -n options are non-standard and their use in scripts is not recommended." Scot -- DISCLAIMER: No electrons were mamed while sending this message. Only slightly bruised.