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

Alexander Bokovoy =?iso-8859-1?q?ab_=CE=C1_altlinux=2Eorg?=
Чт Июл 6 19:36:54 MSD 2006


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.

--- David A. Wheeler



-- 
/ Alexander Bokovoy
Samba Team                      http://www.samba.org/
ALT Linux Team                  http://www.altlinux.org/
Midgard Project Ry              http://www.midgard-project.org/




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