sam th --- [EMAIL PROTECTED] --- http://www.abisource.com/~sam/
OpenPGP Key: CABD33FC --- http://samth.dyndns.org/key
DeCSS: http://samth.dyndns.org/decss



>From [EMAIL PROTECTED]  Thu Apr  5 09:47:46 2001
Return-Path: <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]
Received: from grace.speakeasy.org (grace.speakeasy.org [216.254.0.2])
        by parsons.abisource.com (Postfix) with SMTP id 8E62413B818
        for <[EMAIL PROTECTED]>; Thu,  5 Apr 2001 09:47:45 -0500 (CDT)
Received: (qmail 2248 invoked by uid 24233); 5 Apr 2001 14:47:39 -0000
Date: Thu, 5 Apr 2001 10:48:28 -0400 (EDT)
From: Pavel Roskin <[EMAIL PROTECTED]>
X-X-Sender:  <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Don't use plain "cp" in scripts
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: [EMAIL PROTECTED]

Hello, developers!

Please don't use "cp" without modifiers in scripts. There are two problems
with it - read-only files cannot be overwritten (this was the error I
observed while installing ttfadmin.sh) and "cp" may be an alias to "cp -i"
which is interactive. Here's the patch.

_____________________________
--- abi/src/pkg/common/unix/scripts/install.sh
+++ abi/src/pkg/common/unix/scripts/install.sh
@@ -135,7 +135,7 @@
 ########################################################################

 echo "Installing ttfadmin script [$TARGET/bin]"
-cp $SCRIPTDIR/../../../../tools/scripts/unix/ttfadmin.sh $TARGET/bin/ttfadmin.sh
+cp -f $SCRIPTDIR/../../../../tools/scripts/unix/ttfadmin.sh $TARGET/bin/ttfadmin.sh
 chmod -f 500 $TARGET/bin/ttfadmin.sh


--- abi/src/tools/scripts/unix/Makefile
+++ abi/src/tools/scripts/unix/Makefile
@@ -30,6 +30,6 @@

 # just copy any scripts to the bin directory
 $(TTFADMIN):
-       (cp ttfadmin.sh $(BINDIR)/ttfadmin.sh; chmod -f 500 $(BINDIR)/ttfadmin.sh )
+       (cp -f ttfadmin.sh $(BINDIR)/ttfadmin.sh; chmod -f 500 $(BINDIR)/ttfadmin.sh )

 build:: $(TARGETS)
_____________________________

Regards,
Pavel Roskin



PGP signature

Reply via email to