Re: Executable scripts in /usr/share/
Ben Finney <firstname.lastname@example.org> writes:
> On 10-May-2005, Sven Mueller wrote:
>> Note that (application specific portions of) /usr/share are often
>> mounted even across different types of Unix (derivates). I know of at
>> least 4 sites where /usr/share/cups was network-mounted by both Linux
>> and Solaris clients.
>> That's the reason why I usually think of /usr/share as architecture
>> indepedent and non-executable data.
> The good thing about the (standard?) shebang convention -- using a
> first line of '#!/path/to/shell' in the executable file -- is that you
> can have executable scripts shared even between different Unices and
> architectures. If the named shell exists, it should be able to execute
> the script. (If not, that's a bug in the shell or the script.)
> That's the only way I know that executable things can be trusted to
> work across different Unices and architectures, so it's understandable
> where your "non-executable" assumption could arise.
Something you sometimes see is
Env then looks for python in the path and executes the script. Since
env is small and a system thing it is available everywhere while
python can be anywhere. That way you can have your python in
/usr/bin/arch-os/ for each arch/os combo and the script still works.