delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/04/10/13:35:13

From: jeffdbREMOVETHIS AT goodnet DOT com (Mikey)
Subject: Re: cygwinb19.1.dll sh.exe still won't run shell scripts from path + workaround
10 Apr 1998 13:35:13 -0700 :
Sender: root AT cygnus DOT com
Message-ID: <352d0aca.158280649.cygnus.gnu-win32@smtp.goodnet.com>
References: <199804081543 DOT LAA23929 AT subrogation DOT cygnus DOT com>
Reply-To: jeffdbREMOVETHIS AT goodnet DOT com
To: Ian Lance Taylor <ian AT cygnus DOT com>, gnu-win32 AT cygnus DOT com
MIME-Version: 1.0

Pick any extension you want, but the OS needs an extension
to associate with an executable.

If spawn.cc->perhaps_suffix is given that extension
you can exec the script the same as under unix,
without the extension.

..sh implies /bin/sh
..shc Means 
Shell Script With Magic (at least on my system :)

Yes, it works on my system, double click a file
with an extension, and without an association,
and the system will ask you what executable
you want to use to open it.
Select \bin\bash.exe as the application.

In the box on top name the extension 
Shell Script With Magic

Explorer->View->options->File Types->Shell Script With Magic
edit->File Type
edit->open
change g:\bin\bash "%1" to g:\bin\bash -i "%1"
from explorer double click the script, it will exec.

from a dos prompt

start.exe script.shc 

it will exec.

And yes I'm sure this can be done by the installer. ;^)
in fact it's standard practice for most installers
to set up .doc -> .exe associations.

On Wed, 8 Apr 1998 11:43:11 -0400, you wrote:

>   From: jeffdbREMOVETHIS AT goodnet DOT com (Mikey)
>   Date: Wed, 08 Apr 1998 15:27:55 GMT
>
>   It's unique, and it's 3 letters so you don't need a special case
>   in the code.
>
>I would use `.sh'.  A special case in the code costs nothing.
>Expecting people to use a different extension seems pointless.  Why
>introduce something new when there is already something old that
>should work fine?
>
>   Double clicking updatedb.shc invokes bash -i updatedb.shc
>   (you have to fix the association yourself for -i)
>   which checks for #! and execs 
>   sh -c updatedb.shc
>   (at least that seems to be what is happening ;^)
>
>Are you saying that this works today?  Is that something that the
>installer sets up?
>
>Ian


=====================================================
Linux a platform built by, and for users, standing on
the firm legs of reliability, and speed.

Microsoft Windows, a platform without a leg to stand on.

(jeffdbREMOVETHIS AT netzone DOT com)
delete REMOVETHIS from the above to reply
         Mikey
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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