This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: How do I make scripts my PC executable

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



Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]