delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/03/04/11:00:05

Date: Sun, 04 Mar 2001 18:00:14 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <7458-Sun04Mar2001180014+0200-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
CC: djgpp-workers AT delorie DOT com
In-reply-to: <200103041434.PAA07837@mother.ludd.luth.se> (message from Martin
Str|mberg on Sun, 4 Mar 2001 15:34:30 +0100 (MET))
Subject: Re: Fileutils 4.0 port and ginstall
References: <200103041434 DOT PAA07837 AT mother DOT ludd DOT luth DOT se>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
> Date: Sun, 4 Mar 2001 15:34:30 +0100 (MET)
> 
> According to Richard Dawe:
> >     ginstall c:/windows/command.com b
> > 
> > creates b.exe. I haven't yet written code to distinguish between .exe and
> > .com formats.
> 
> As COMMAND.COM is an .EXE in disguise you won't be able to do this
> right unless you look at the extension.

For whatever reasons, I didn't see the original message, so I might be
off target...

Please note that whatever trickery I put inside ginstall, it had only
one purpose: to make commands such as "ginstall foo /usr/local/bin/foo" 
silently DTRT, i.e. create /usr/local/bin/foo.exe.

Given that, why would we want "ginstall command.com b" do anything
specific, one way or the other?  Why would someone do such a... how
should I put it gently?.. weird thing?

I think if the user wants the destination file have a specific
extension, she should kindly specify that extension explicitly.

> > I am unsure how to decide that a file is a DOS batch file. The patches to
> > ginstall for DJGPP currently modify the target filename, depending on the
> > source file's file format. Here's some pseudo-code:
> 
> ... this. The easiest way is to look at the extension of the filename.

Yes, a batch file _must_ have a .bat extension, otherwise COMMAND.COM
won't run it as a batch file.  If you want to be fancy, add support
for *.btm files as well.

Again, since I missed the original message, I don't even understand
why do you want to detect batch files.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019