delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/08/30/04:06:22

X-Spam-Check-By: sourceware.org
Message-ID: <46D6462D.1020203@holdenweb.com>
Date: Thu, 30 Aug 2007 00:23:09 -0400
From: Steve Holden <steve AT holdenweb DOT com>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
Newsgroups: gmane.os.cygwin
To: cygwin AT cygwin DOT com
Subject: Re: How do I make scripts my PC executable
References: <12391292 DOT post AT talk DOT nabble DOT com> <005801c7eabb$cd519bd0$0a00a8c0 AT a64x23800p>
In-Reply-To: <005801c7eabb$cd519bd0$0a00a8c0@a64x23800p>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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

David Christensen wrote:
> zip184 wrote:
>> I have some scripts I'd like to run without starting cygwin and
>> typing in their paths.  Is there a way to make windows recognize that
>> a file is a bash/python script and run them like as if I ran them in
>> cygwin?  I'd like to just be able to doubleclick them in windows
>> explorer.  Is this possible? (I'm using bash and python scripts)
> 
> I have a series of Cygwin Bash and Perl scripts for backing up my machines.  I
> develop/debug them interactively using Cygwin Bash shells.  Once everything
> works, I light them off using a shortcut pointing to a batch file that fires up
> Cygwin Bash and tells it to process the top-level Bash shell script:
> 
>     $ cat ssh-backup-all.bat
>     C:\cygwin\bin\bash ./ssh-backup-all
> 
> 
> The top-level Bash shell script sets the environment up to match interactive
> login and then does it's job:
> 
>     $ cat ssh-backup-all
>     #! /bin/sh
>     . /etc/profile
>     . /home/dpchrist/.bash_profile
>     ##### do backup stuff
> 
Wouldn't it be possible to omit the first two executable lines and have 
the batch script read

c:\cygwin\bin\bash -l ./ssh-backup-all

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC/Ltd           http://www.holdenweb.com
Skype: holdenweb      http://del.icio.us/steve.holden
--------------- Asciimercial ------------------
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
----------- Thank You for Reading -------------

--
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