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: can a postinstall script be other than shell?


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/


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