delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/07/08/00:06:57

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
From: "Krzysztof Duleba" <krzysan AT skrzynka DOT pl>
Subject: Re: Running a shell Script Directly from windows
Date: Thu, 8 Jul 2004 06:06:37 +0200
Lines: 25
Message-ID: <ccih7d$eiv$1@sea.gmane.org>
References: <Pine DOT LNX DOT 4 DOT 44 DOT 0407072102550 DOT 1460-100000 AT ccc3 DOT wpi DOT edu> <40ECB238 DOT 9180C98D AT dessent DOT net>
Mime-Version: 1.0
X-Complaints-To: usenet AT sea DOT gmane DOT org
X-Gmane-NNTP-Posting-Host: ya90.internetdsl.tpnet.pl
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409

Brian Dessent wrote:


> > I am wondering if Cygwin provides a way to run shell scripts or other
> > programs that run within Cygwin, directly from windows (or a .bat). In
> > other words, I would like to double-click something on my desktop and
have
> > it run the shell script. .
>
> Create a shortcut that runs "sh.exe /path/to/script.sh".  When you click
> on it your script will run in a command window.  If your cygwin bin
> directory is not in your path then the shortcut will have to include it,
> i.e. "c:\cygwin\bin\sh.exe /home/foo/bar.sh".

I guess that the following solution is better, as no additional files
except for the script itself are used.

Right-click script.sh, select "open with", "choose a program" (or whatever
the name for the option is), then go to your Cygwin directory, select
bash.exe, mark "always ..." and then click ok. Since then, everytime you
double-click the script, it will be launched.

Regards
Krzysztof Duleba



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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