This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: can a postinstall script be other than shell?
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: george young <gry at ll dot mit dot edu>
- Cc: cygwin at cygwin dot com
- Date: Tue, 21 Dec 2004 15:25:47 -0500 (EST)
- Subject: Re: can a postinstall script be other than shell?
- References: <20041221134503.2def234b.gry@ll.mit.edu>
- Reply-to: cygwin at cygwin dot com
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@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.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/