script relative shebang

From: Boris Rybalkin
Date: Tue May 31 2016 - 17:47:58 EST


Hi All,

I would like to know if any changes to parsing '#!' script header line
are accepted in particular having ability to run interpreter from
relative to the script path?

Something like:

#!{dirname}/python/bin/python

Where {dirname} is a special keyword replaced with dirname of a script.

This is useful for apps which bring dependencies with them and do not
want to hardcode absolute paths as target fs layout is not known or
has to be flexible.

As I understand the implementation is here and I could probably provide a patch:
fs/binfmt_script.c

Sorry if this is not the right place to discuss these things.

Thank you.


--
Boris Rybalkin
ribalkin@xxxxxxxxx