[sisyphus] амарок умер...

Led =?iso-8859-1?q?led_=CE=C1_ukr-fin=2Ecom=2Eua?=
Чт Июл 6 19:42:56 MSD 2006


В сообщении от 6 июля 2006 18:36 Alexander Bokovoy написал(a):
> Led пишет:
> >> Я говорю о переносимости.
> >
> > Переносимость обеспечивается при сборке пакета приблизительно так:
> > subst 's|#!/usr/bin/env ruby|%_bindir/ruby|' script А как на счёт
> > переносимости "/usr/bin/env"?
>
> Не передергивайте. /usr/bin/env -- самый старый и известный способ
> указания путей к трансляторам в *BSD-системах. Вот комментарий на эту
> тему Дэвида Уиллера в рассылке git:
>
> --------------------------------------------------------------------
> Using env this way an old trick; I don't know who originally came up
> with it.
>
> Technically, even this isn't 100% portable.  Leading "#!" (shebang)
> isn't implemented by a very few old systems (it's not in the Single User
> Spec,
> though it was introduced between v7 and v8 of Unix). Also,
> you can find one or two really obscure systems where env isn't in /usr/bin
> (OpenServer 5 and a few really old Linux distributions).
> But env is ONLY in /usr/bin for the *BSDs.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> This version runs on 99.999% of the Linux/Unix systems, and takes
> essentially zero effort to implement; "more portable" solutions are so much
> more work that few people bother if they're writing shell scripts.

Тогда да, согласен. тут не поспоришь, если человек перепробовал как минимум 
10000 разных "Linux/Unix systems":)

-- 
Led.



Подробная информация о списке рассылки Sisyphus