delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/12/21/15:27:09

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
Date: Tue, 21 Dec 2004 15:25:47 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: george young <gry AT ll DOT mit DOT edu>
cc: cygwin AT cygwin DOT com
Subject: Re: can a postinstall script be other than shell?
In-Reply-To: <20041221134503.2def234b.gry@ll.mit.edu>
Message-ID: <Pine.GSO.4.61.0412211520050.16929@slinky.cs.nyu.edu>
References: <20041221134503 DOT 2def234b DOT gry AT ll DOT mit DOT edu>
MIME-Version: 1.0

On Tue, 21 Dec 2004, george young wrote:

> Can a postinstall script be other than a shell script?
>
> I gather that setup looks for *.sh, but if I name a file
> /etc/postinstall/foobar.sh, and it contains:
>
>   #!/bin/python
>   ...some python code...
>
> will it work?  Or do I have to have a skeleton shell script
> that calls my python script?

Yes.  A postinstall script is invoked by calling 'sh -c script' (as
opposed to 'sh script') so it should honor the shebang line.  In other
words, it will work.

Note, however, that if python acquires a postinstall script at some point,
you'll need to make sure that by the time your postinstall script runs,
python's postinstall script has run.  Setup has logic for this, but due to
one of its numerous bugs, postinstall scripts aren't run in dependency
order.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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